90 lines
1.8 KiB
Docker
90 lines
1.8 KiB
Docker
# 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"
|
|
|
|
|
|
USER root
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
RUN apt-get update && apt-get install -y \
|
|
g++ \
|
|
sudo \
|
|
bash \
|
|
curl \
|
|
libmysqlclient-dev \
|
|
zip \
|
|
libc6 \
|
|
&&\
|
|
ln --force --symbolic /usr/bin/python3 /usr/bin/python &&\
|
|
pip3 install \
|
|
pylint \
|
|
colored \
|
|
requests \
|
|
python-dateutil \
|
|
cloudpickle \
|
|
pickleshare \
|
|
packaging \
|
|
h5py \
|
|
matplotlib \
|
|
seaborn \
|
|
scikit-learn \
|
|
scipy \
|
|
tqdm \
|
|
networkx \
|
|
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 - &&\
|
|
apt-get install -y nodejs &&\
|
|
jupyter labextension install @jupyter-widgets/jupyterlab-manager &&\
|
|
jupyter nbextension enable --py widgetsnbextension
|
|
RUN useradd \
|
|
--create-home \
|
|
--password "hashlife" \
|
|
--shell /usr/bin/bash \
|
|
--user-group \
|
|
--groups sudo \
|
|
$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
|
|
CMD ["jupyter", "lab", \
|
|
"--ip=0.0.0.0", \
|
|
"--LabApp.token=''", \
|
|
"--ContentsManager.allow_hidden=True"]
|
|
|