Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
uebergeek999 committed Nov 16, 2024
1 parent 1f21dd9 commit ece1802
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ LABEL maintainer="UC San Diego ITS/ETS <[email protected]>"
# 2) change to root to install packages
USER root


RUN apt-get -q update && \
apt-get install -qy \
p7zip-full \
software-properties-common

# install cuda 11-1 and toolkit
# https://developer.nvidia.com/cuda-11.1.0-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=2004&target_type=debnetwork
RUN apt-get update && \
apt-get install -y p7zip-full software-properties-common && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin && \
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin && \
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub && \
Expand All @@ -26,18 +27,15 @@ RUN apt-get update && \
wget -nv https://urldefense.com/v3/__https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libnccl2_2.8.4-1*cuda11.1_amd64.deb__;Kw!!Mih3wA!Gdyp1ukt20BXVegNBzmgDfWhJBT9wJRv0kfA_Go0MCt8kLnGgWIlIwf4enXHKWsp-Mfo5Hrl5w5FGlY-z9s2UILA$ -O /var/tmp/libnccl2.deb && \
dpkg -i /var/tmp/libcudnn8.deb /var/tmp/libnccl2.deb

RUN fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER


COPY env.yml /tmp/env.yml

RUN conda env create --file /tmp/env.yml && \
eval "$(conda shell.bash hook)" && \
conda activate ${KERNEL} && \
mkdir -p $CONDA_PREFIX/etc/conda/activate.d && \
# CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)")) && \
# echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh && \
# CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)")) && \
# echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh && \
python -m ipykernel install --name=${KERNEL} && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
Expand Down

0 comments on commit ece1802

Please sign in to comment.