Skip to content

Commit

Permalink
Begin scipy-ml rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
dafeliton committed Nov 6, 2023
1 parent fcd709a commit 74b399f
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions images/scipy-ml-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG BASE_TAG=latest
FROM ghcr.io/ucsd-ets/datascience-notebook:$BASE_TAG
FROM ghcr.io/ucsd-ets/datascience-notebook:2023.4-fix-rstudio-proxy

USER root

Expand Down Expand Up @@ -49,28 +49,40 @@ RUN mamba install -c "nvidia/label/cuda-11.8.0" cuda-nvcc -y && \
# install protobuf to avoid weird base type error. seems like if we don't then it'll be installed twice.
# https://github.com/spesmilo/electrum/issues/7825
# pip cache purge didnt work here for some reason.
RUN pip install --no-cache-dir protobuf==3.20.3
RUN mamba install protobuf=3.20.3

# cuda-python installed to have parity with tensorflow and cudnn
# Install pillow<7 due to dependency issue https://github.com/pytorch/vision/issues/1712
# tensorrt installed to fix not having libnvinfer that has caused tensorflow issues.
# tensorrt installed to fix not having libnvinfer that has caused tensorflow issues.
RUN pip install datascience \
PyQt5 \
scapy \
nltk \
opencv-contrib-python-headless \
opencv-python \
pycocotools \
pillow \
nvidia-cudnn-cu11==8.6.0.163 \
tensorflow==2.13.* \
keras==2.13.1 \
tensorflow-datasets \
tensorrt==8.5.3.1 && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER && \
pip cache purge
RUN mamba install \
datascience \
pyqt \
scapy \
nltk_data \
opencv \
pycocotools \
#tensorflow=2.13.1 \
#tensorflow-datasets \
keras=2.13.1 \
-c conda-forge && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER && \
mamba clean -a -y

RUN mamba install \
pillow \
-c anaconda && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER && \
mamba clean -a -y

RUN pip install nvidia-cudnn-cu11==8.6.0.163 tensorrt==8.5.3.1 && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER && \
mamba clean -a -y


# no purge required but no-cache-dir is used. pip purge will actually break the build here!

# torch must be installed separately since it requires a non-pypi repo. See stable version above
Expand All @@ -80,7 +92,9 @@ RUN pip install datascience \
# We already have the lib files imported into LD_LIBRARY_PATH by CUDDN and the cudatoolkit. let's remove these and save some image space.
# Beware of potentially needing to update these if we update the drivers.
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && \
pip cache purge && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER && \
mamba clean -a -y && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_cnn_infer.so.8 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcublasLt.so.11 && \
rm /opt/conda/lib/python3.9/site-packages/torch/lib/libcudnn_adv_infer.so.8 && \
Expand Down

0 comments on commit 74b399f

Please sign in to comment.