-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added jupyter-pytorch-notebook Dockerfile
- Loading branch information
1 parent
b5ec59e
commit d9ce834
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
# Use a GPU-enabled base image based on the recommendation from | ||
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#gpu-accelerated-notebooks | ||
# As this combines the tensorflow-notebook and the cuda-notebook, so we only | ||
# need to install the additional packages for each course. | ||
FROM cschranz/gpu-jupyter:v1.5_cuda-11.6_ubuntu-20.04_python-only | ||
|
||
USER root | ||
# The base image only gets updated when a new version of CUDA is released. | ||
# We need to update the base image to get the latest security updates. | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get autoremove -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
USER ${NB_UID} | ||
|
||
# Required for Tensorboard on a remote container | ||
RUN mamba install --yes \ | ||
'jupyter-server-proxy' && \ | ||
# SciML requirements | ||
mamba install --yes \ | ||
'pytorch' 'transformers' 'accelerate' 'bitsandbytes' && \ | ||
mamba clean --all -f -y && \ | ||
fix-permissions "${CONDA_DIR}" && \ | ||
fix-permissions "/home/${NB_USER}" | ||
|