2022-11-06 23:52:55 -08:00
|
|
|
# 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
|
2021-01-02 23:30:57 -08:00
|
|
|
|
|
|
|
ARG NB_USER="jovyan"
|
|
|
|
|
2022-11-06 23:52:55 -08:00
|
|
|
|
2021-01-02 23:30:57 -08:00
|
|
|
USER root
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
2022-05-07 11:59:27 -07:00
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
g++ \
|
2021-01-02 23:30:57 -08:00
|
|
|
sudo \
|
2022-11-06 23:52:55 -08:00
|
|
|
bash \
|
2022-05-07 11:59:27 -07:00
|
|
|
curl \
|
2022-11-06 23:52:55 -08:00
|
|
|
libmysqlclient-dev \
|
|
|
|
zip \
|
|
|
|
libc6 \
|
2021-01-02 23:30:57 -08:00
|
|
|
&&\
|
|
|
|
ln --force --symbolic /usr/bin/python3 /usr/bin/python &&\
|
|
|
|
pip3 install \
|
|
|
|
pylint \
|
|
|
|
colored \
|
2022-11-06 23:52:55 -08:00
|
|
|
requests \
|
|
|
|
python-dateutil \
|
|
|
|
cloudpickle \
|
|
|
|
pickleshare \
|
|
|
|
packaging \
|
|
|
|
h5py \
|
2021-01-02 23:30:57 -08:00
|
|
|
matplotlib \
|
|
|
|
seaborn \
|
|
|
|
scikit-learn \
|
|
|
|
scipy \
|
|
|
|
tqdm \
|
2022-05-07 11:59:27 -07:00
|
|
|
networkx \
|
2022-11-06 23:52:55 -08:00
|
|
|
gym \
|
|
|
|
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 - &&\
|
2022-05-07 11:59:27 -07:00
|
|
|
apt-get install -y nodejs &&\
|
2022-11-06 23:52:55 -08:00
|
|
|
jupyter labextension install @jupyter-widgets/jupyterlab-manager &&\
|
|
|
|
jupyter nbextension enable --py widgetsnbextension
|
2022-05-07 11:59:27 -07:00
|
|
|
RUN useradd \
|
2021-01-02 23:30:57 -08:00
|
|
|
--create-home \
|
|
|
|
--password "hashlife" \
|
|
|
|
--shell /usr/bin/bash \
|
|
|
|
--user-group \
|
2022-05-07 11:59:27 -07:00
|
|
|
--groups sudo \
|
2021-01-02 23:30:57 -08:00
|
|
|
$NB_USER &&\
|
|
|
|
echo "$NB_USER:hashlife" | chpasswd &&\
|
|
|
|
mkdir -p /data &&\
|
|
|
|
chown $NB_USER /data
|
|
|
|
|
|
|
|
COPY --chown=$NB_USER jupyter_notebook_config.py /home/$NB_USER/.jupyter/
|
|
|
|
|
|
|
|
USER $NB_USER
|
|
|
|
WORKDIR /data
|
|
|
|
#ENV LD_LIBRARY_PATH /usr/local/cuda-10.1/compat:$LD_LIBRARY_PATH
|
2022-11-06 23:52:55 -08:00
|
|
|
CMD ["jupyter", "lab", \
|
|
|
|
"--ip=0.0.0.0", \
|
|
|
|
"--LabApp.token=''", \
|
|
|
|
"--ContentsManager.allow_hidden=True"]
|
2021-01-02 23:30:57 -08:00
|
|
|
|