-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (40 loc) · 1.17 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
FROM nvcr.io/nvidia/cuda:11.3.1-cudnn8-devel-ubuntu20.04
LABEL maintainer "Daniel Bershatsky <[email protected]>"
# Set up default timezone.
ENV TZ=Europe/Moscow
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
# Install common packages.
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
git \
neovim \
python3 \
python3-pip \
python3.9 \
python3.9-venv && \
rm -rf /var/lib/apt/lists/*
# Set up workspace directory to non-root user.
WORKDIR /workspace
ARG LOGIN=developer
ARG UID=1000
RUN useradd -m -U -u $UID $LOGIN && \
chown -R $LOGIN /workspace
USER $LOGIN
# Install required Python packages into virtual env.
ENV PATH="/home/$LOGIN/.local/bin:$PATH"
RUN python3.9 -m venv /home/$LOGIN/.local && \
. /home/$LOGIN/.local/bin/activate && \
pip install \
ipython \
jupyter \
jupytext \
matplotlib \
numpy \
scipy \
wheel && \
pip install \
"jax[cuda111]" \
-f "https://storage.googleapis.com/jax-releases/jax_releases.html" && \
rm -rf /home/$LOGIN/.cache