diff --git a/.env b/deprecated-restricted-gpu/.env similarity index 100% rename from .env rename to deprecated-restricted-gpu/.env diff --git a/Dockerfile b/deprecated-restricted-gpu/Dockerfile similarity index 100% rename from Dockerfile rename to deprecated-restricted-gpu/Dockerfile diff --git a/LICENSE b/deprecated-restricted-gpu/LICENSE similarity index 100% rename from LICENSE rename to deprecated-restricted-gpu/LICENSE diff --git a/README.md b/deprecated-restricted-gpu/README.md similarity index 100% rename from README.md rename to deprecated-restricted-gpu/README.md diff --git a/start-notebook.sh b/deprecated-restricted-gpu/start-notebook.sh similarity index 100% rename from start-notebook.sh rename to deprecated-restricted-gpu/start-notebook.sh diff --git a/start-singleuser.sh b/deprecated-restricted-gpu/start-singleuser.sh similarity index 100% rename from start-singleuser.sh rename to deprecated-restricted-gpu/start-singleuser.sh diff --git a/start.sh b/deprecated-restricted-gpu/start.sh similarity index 100% rename from start.sh rename to deprecated-restricted-gpu/start.sh diff --git a/restricted-gpu-slim/Dockerfile b/restricted-gpu-slim/Dockerfile new file mode 100644 index 0000000..f1e8dcd --- /dev/null +++ b/restricted-gpu-slim/Dockerfile @@ -0,0 +1,22 @@ +# use base image +FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-root + +RUN sudo apt update + +# setup CUDA +RUN sudo apt-get install -y kmod \ + && wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \ + && sudo bash cuda_11.8.0_520.61.05_linux.run --silent --toolkit + +# setup cuDNN +RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \ + && sudo dpkg -i cuda-keyring_1.1-1_all.deb \ + && sudo apt-get update \ + && sudo apt-get -y install cudnn \ + && echo 'export PATH=$PATH:/usr/local/cuda-11.8/bin' > ~/.bashrc \ + && echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib6:$LD_LIBRARY_PATH' >> ~/.bashrc \ + && source ~/.bashrc + +# return to non-root user +USER $NB_UID +WORKDIR /home/$NB_USER \ No newline at end of file diff --git a/restricted-gpu-slim/README.md b/restricted-gpu-slim/README.md new file mode 100644 index 0000000..eb9fe7b --- /dev/null +++ b/restricted-gpu-slim/README.md @@ -0,0 +1,3 @@ +# Restricted GPU + +Restricted GPU with CUDA and CuDNN. Tested on AWS GPU P4 instance (Tesla V100 GPUs). See Dockerfile for more details. \ No newline at end of file diff --git a/restricted-gpu/Dockerfile b/restricted-gpu/Dockerfile new file mode 100644 index 0000000..91299c8 --- /dev/null +++ b/restricted-gpu/Dockerfile @@ -0,0 +1,28 @@ +# Use base image +FROM quay.io/ohsu-comp-bio/bridge2ai-jupyter:cpu-root + +RUN sudo apt update + +# Setup CUDA +RUN sudo apt-get install -y kmod \ + && wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \ + && sudo bash cuda_11.8.0_520.61.05_linux.run --silent --toolkit + +# Setup cuDNN +RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \ + && sudo dpkg -i cuda-keyring_1.1-1_all.deb \ + && sudo apt-get update \ + && sudo apt-get -y install cudnn \ + && echo 'export PATH=$PATH:/usr/local/cuda-11.8/bin' > ~/.bashrc \ + && echo 'export LD_LIBRARY_PATH=/usr/local/cuda-11.8/lib6:$LD_LIBRARY_PATH' >> ~/.bashrc \ + && source ~/.bashrc + +# Install TensorFlow +RUN pip install tensorflow==2.14.0 + +# Install PyTorch +RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 + +# return to non-root user +USER $NB_UID +WORKDIR /home/$NB_USER \ No newline at end of file diff --git a/restricted-gpu/README.md b/restricted-gpu/README.md new file mode 100644 index 0000000..cfb6e4e --- /dev/null +++ b/restricted-gpu/README.md @@ -0,0 +1,3 @@ +# Restricted GPU + +Restricted GPU with CUDA and CuDNN along with Tensorflow and Pytorch installed. Tested on AWS P3 GPU instance (Tesla V100 GPUs). See Dockerfile for more details. \ No newline at end of file