-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
83 lines (73 loc) · 2.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM nvidia/cuda:11.8.0-devel-ubuntu20.04
ENV CONDA_OVERRIDE_CUDA=11.8
EXPOSE 8888
ENV CONDA_DIR=/opt/saturncloud
ENV CONDA_BIN=${CONDA_DIR}/bin
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-key del 7fa2af80 && \
rm -f /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/cuda.list && \
apt-get -qq --allow-releaseinfo-change update && \
apt-get -qq upgrade -y && \
apt-get -qq install --yes --no-install-recommends \
awscli \
dumb-init \
build-essential \
bzip2 \
ca-certificates \
curl \
file \
gettext-base \
git \
gnupg \
htop \
libnuma-dev \
locales \
openssh-server \
rsync \
screen \
ssh \
sudo \
unzip \
wget \
zip \
> /dev/null && \
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
dpkg -i cuda-keyring_1.0-1_all.deb && \
rm cuda-keyring_1.0-1_all.deb && \
apt-get -qq purge && \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /run/sshd && \
chmod 755 /run/sshd && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV SHELL /bin/bash
ENV NB_USER=jovyan
ENV NB_UID=1000
COPY install-miniconda.bash /tmp/install-miniconda.bash
ARG CONDA_VERSION=py39_4.11.0
RUN bash /tmp/install-miniconda.bash
ENV USER=${NB_USER}
ENV HOME=/home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER} && \
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook && \
chown 1000:1000 -R /opt/saturncloud
COPY profile /etc/profile
USER ${NB_USER}
COPY install-jupyter.bash /tmp/install-jupyter.bash
COPY environment.yml /tmp/environment.yml
RUN bash /tmp/install-jupyter.bash && \
echo '' > ${CONDA_DIR}/conda-meta/history && \
${CONDA_BIN}/conda config --system --add channels conda-forge && \
${CONDA_BIN}/conda config --system --set auto_update_conda false && \
${CONDA_BIN}/conda config --system --set show_channel_urls true
ENV NB_PYTHON_PREFIX ${CONDA_DIR}/envs/saturn
ENV PATH ${NB_PYTHON_PREFIX}/bin:${CONDA_BIN}:${HOME}/.local/bin:${PATH}
WORKDIR ${HOME}
ENTRYPOINT []