Skip to content

Commit

Permalink
Merge pull request #18 from StatCan/constrstarts-fastai
Browse files Browse the repository at this point in the history
update constrstarts-fastai image for jupyter lab
  • Loading branch information
blairdrummond authored Jul 2, 2020
2 parents 0d77351 + f5e5f00 commit 4544968
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
9 changes: 7 additions & 2 deletions constrstarts-fastai/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ ENV USER fastai
RUN mkdir -p /home/jovyan && chmod -R a+w /home/jovyan/
WORKDIR /home/jovyan

COPY requirements.txt install_requirements.sh /home/jovyan/
# COPY requirements.txt install_requirements.sh /home/jovyan/
COPY requirements.txt install_requirements.sh /tmp/


# removal due to security risk
RUN apt-get remove -y libxml2
RUN rm -rf /notebooks

RUN bash -c '. activate fastai && pip install jupyterlab==2.1.5'

# "shell" form
CMD ./install_requirements.sh ; /opt/conda/envs/fastai/bin/jupyter notebook --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}
# /tmp/install_requirements.sh
CMD /opt/conda/envs/fastai/bin/jupyter notebook --notebook-dir=/home/jovyan --ip=0.0.0.0 --no-browser --allow-root --port=8888 --NotebookApp.token='' --NotebookApp.password='' --NotebookApp.allow_origin='*' --NotebookApp.base_url=${NB_PREFIX}
8 changes: 5 additions & 3 deletions constrstarts-fastai/install_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ conda update -n base -c defaults -y conda
# Activating fastai conda env and installing the required packages.
. activate fastai
conda update -y --all
pip install -r requirements.txt
conda install -c conda-forge rtree==0.9.4 gdal==3.1.0
pip install solaris==0.2.0 --ignore-installed PyYAML torchvision==0.5.0
yes | pip install -r /tmp/requirements.txt
conda install -y -c conda-forge rtree==0.9.4 gdal==3.1.0
yes | pip install solaris==0.2.0 --ignore-installed PyYAML torchvision==0.5.0



# Removing unnecessary packages.
apt autoremove
Expand Down
3 changes: 1 addition & 2 deletions constrstarts-fastai/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ pigeon-jupyter==0.1.0
opencv-python==4.2.0.34
distro==1.4.0
scikit-image==0.16.2
gpustat==0.6.0
jupyterlab==2.1.5
gpustat==0.6.0

0 comments on commit 4544968

Please sign in to comment.