Switch to PyTorch lightning in jupyter hub
This commit is contained in:
parent
74b49aab6b
commit
e5598e416f
|
@ -1,34 +1,71 @@
|
||||||
FROM nvidia/cuda:11.2.2-cudnn8-runtime-ubuntu20.04
|
# Base Image
|
||||||
|
|
||||||
|
# Not using this one since it only provides python3.7. This has been a
|
||||||
|
# long standing issue.
|
||||||
|
#
|
||||||
|
#FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime
|
||||||
|
FROM pytorchlightning/pytorch_lightning:base-cuda-py3.9-torch1.12-cuda11.6.1
|
||||||
|
|
||||||
|
# pytorch base provides the packages:
|
||||||
|
#
|
||||||
|
# python3, python3-pip
|
||||||
|
#
|
||||||
|
# and
|
||||||
|
#
|
||||||
|
# torch, torchvision
|
||||||
|
|
||||||
|
# Some python-packages need mysql-config,
|
||||||
|
# which is provided by libmysqlclient-dev
|
||||||
|
|
||||||
ARG NB_USER="jovyan"
|
ARG NB_USER="jovyan"
|
||||||
|
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
g++ \
|
g++ \
|
||||||
nodejs \
|
|
||||||
python3.8 \
|
|
||||||
python3-pip \
|
|
||||||
sudo \
|
sudo \
|
||||||
|
bash \
|
||||||
curl \
|
curl \
|
||||||
|
libmysqlclient-dev \
|
||||||
|
zip \
|
||||||
|
libc6 \
|
||||||
&&\
|
&&\
|
||||||
ln --force --symbolic /usr/bin/python3 /usr/bin/python &&\
|
ln --force --symbolic /usr/bin/python3 /usr/bin/python &&\
|
||||||
pip3 install \
|
pip3 install \
|
||||||
jupyterlab \
|
|
||||||
pylint \
|
pylint \
|
||||||
tensorflow-gpu==2.7.0 \
|
|
||||||
tensorboard==2.7.0 \
|
|
||||||
colored \
|
colored \
|
||||||
|
requests \
|
||||||
|
python-dateutil \
|
||||||
|
cloudpickle \
|
||||||
|
pickleshare \
|
||||||
|
packaging \
|
||||||
|
h5py \
|
||||||
matplotlib \
|
matplotlib \
|
||||||
seaborn \
|
seaborn \
|
||||||
scikit-learn \
|
scikit-learn \
|
||||||
scipy \
|
scipy \
|
||||||
tqdm \
|
tqdm \
|
||||||
networkx \
|
networkx \
|
||||||
&&\
|
gym \
|
||||||
curl -fsSL https://deb.nodesource.com/setup_17.x | bash - &&\
|
pattern \
|
||||||
|
imageio \
|
||||||
|
opt-einsum \
|
||||||
|
einops \
|
||||||
|
torchinfo \
|
||||||
|
torchaudio \
|
||||||
|
torchtext \
|
||||||
|
torchmetrics \
|
||||||
|
torch-geometric \
|
||||||
|
torchviz \
|
||||||
|
tensorboard
|
||||||
|
RUN pip3 install \
|
||||||
|
jupyterlab \
|
||||||
|
ipywidgets &&\
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
|
||||||
apt-get install -y nodejs &&\
|
apt-get install -y nodejs &&\
|
||||||
jupyter labextension install @jupyter-widgets/jupyterlab-manager
|
jupyter labextension install @jupyter-widgets/jupyterlab-manager &&\
|
||||||
|
jupyter nbextension enable --py widgetsnbextension
|
||||||
RUN useradd \
|
RUN useradd \
|
||||||
--create-home \
|
--create-home \
|
||||||
--password "hashlife" \
|
--password "hashlife" \
|
||||||
|
@ -40,11 +77,13 @@ RUN useradd \
|
||||||
mkdir -p /data &&\
|
mkdir -p /data &&\
|
||||||
chown $NB_USER /data
|
chown $NB_USER /data
|
||||||
|
|
||||||
|
|
||||||
COPY --chown=$NB_USER jupyter_notebook_config.py /home/$NB_USER/.jupyter/
|
COPY --chown=$NB_USER jupyter_notebook_config.py /home/$NB_USER/.jupyter/
|
||||||
|
|
||||||
USER $NB_USER
|
USER $NB_USER
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
#ENV LD_LIBRARY_PATH /usr/local/cuda-10.1/compat:$LD_LIBRARY_PATH
|
#ENV LD_LIBRARY_PATH /usr/local/cuda-10.1/compat:$LD_LIBRARY_PATH
|
||||||
CMD ["jupyter", "lab", "--ContentsManager.allow_hidden=True"]
|
CMD ["jupyter", "lab", \
|
||||||
|
"--ip=0.0.0.0", \
|
||||||
|
"--LabApp.token=''", \
|
||||||
|
"--ContentsManager.allow_hidden=True"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue