Skip to content

Commit

Permalink
Get important image making files from noah
Browse files Browse the repository at this point in the history
  • Loading branch information
frodre committed Mar 12, 2020
1 parent 65a2d17 commit ebb0d4c
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 14 deletions.
36 changes: 22 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,30 @@
FROM us.gcr.io/vcm-ml/fv3gfs-compiled-default:latest
FROM jupyter/base-notebook


RUN apt-get update && apt-get install -y \
python3 \
python3-netcdf4 \
cython3
ENV ENVIRONMENT_SCRIPTS=$FV3NET/.environment-scripts
ENV PROJECT_NAME=fv3net

# Install dependencies (slow)
USER root
RUN apt-get update && apt-get install -y gfortran
ENV FV3NET=/home/$NB_USER/fv3net
ADD environment.yml $FV3NET/
ADD Makefile $FV3NET/
ADD .environment-scripts $ENVIRONMENT_SCRIPTS
RUN fix-permissions $FV3NET
WORKDIR $FV3NET

ADD docker/install_gcloud.sh install_gcloud.sh
RUN bash install_gcloud.sh
USER $NB_UID

ADD docker/download_inputdata.sh download_inputdata.sh
RUN bash download_inputdata.sh
ENV PATH=/opt/conda/envs/fv3net/bin:$PATH
RUN bash $ENVIRONMENT_SCRIPTS/build_environment.sh $PROJECT_NAME

ADD requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
# Add rest of fv3net directory
USER root
ADD . $FV3NET
RUN fix-permissions $FV3NET
USER $NB_UID

COPY . /code
ENV PYTHONPATH=/code:$PYTHONPATH
WORKDIR /code
# setup the local python packages

RUN bash $ENVIRONMENT_SCRIPTS/install_local_packages.sh $PROJECT_NAME
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,15 @@ update_submodules:
git submodule update --recursive --init


install_deps:
bash $(ENVIRONMENT_SCRIPTS)/build_environment.sh $(PROJECT_NAME)

install_local_packages:
bash $(ENVIRONMENT_SCRIPTS)/install_local_packages.sh $(PROJECT_NAME)

create_environment:
bash $(ENVIRONMENT_SCRIPTS)/build_environment.sh $(PROJECT_NAME)
bash $(ENVIRONMENT_SCRIPTS)/install_local_packages.sh $(PROJECT_NAME)


overwrite_baseline_images:
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ dependencies:
- pip:
- gsutil
- nc-time-axis>=1.2.0
- yq
- bump2version>=0.5.11

0 comments on commit ebb0d4c

Please sign in to comment.