-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.cuda114
116 lines (104 loc) · 2.58 KB
/
Dockerfile.cuda114
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
FROM jupyter/datascience-notebook:ubuntu-20.04
LABEL maintainer="Joshua L. Phillips <https://www.cs.mtsu.edu/~jphillips/>"
LABEL release-date="2022-04-30"
USER root
# Additional tools
RUN apt-get update && \
apt-get install -y \
autoconf \
curl \
emacs-nox \
enscript \
g++ \
gcc \
gdb \
graphviz \
less \
libtool \
make \
poppler-utils \
python-opengl \
rsync \
ssh \
texlive-science \
time \
tmux \
vim \
wkhtmltopdf \
xvfb \
zip && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER $NB_UID
# CPU-only stack
# RUN mamba install --yes \
# -c pytorch \
# bash_kernel \
# bokeh==2.3.3 \
# dask-gateway \
# dask-jobqueue \
# dask-mpi \
# expect \
# gym \
# jupyter-server-proxy \
# nltk \
# numpy==1.19.5 \
# plotly \
# pydot \
# pytorch \
# stanfordcorenlp \
# tensorflow \
# torchvision \
# torchaudio \
# websockify \
# xvfbwrapper && \
# mamba clean --all -f -y && \
# fix-permissions "${CONDA_DIR}" && \
# fix-permissions "/home/${NB_USER}"
# GPU-enabled stack
RUN mamba install --yes \
bash_kernel \
bokeh==2.3.3 \
cudatoolkit==11.4.2 \
cudnn==8.2.1.32 \
dask-gateway \
dask-jobqueue \
dask-mpi \
expect \
gym \
jupyter-server-proxy \
nltk \
numpy \
plotly \
pydot \
stanfordcorenlp \
tensorflow-gpu \
websockify \
xvfbwrapper && \
mamba clean --all -f -y && \
mamba install --yes \
cudatoolkit-dev==11.4.0 && \
pip install --quiet --no-cache-dir \
gensim && \
pip install --quiet --no-cache-dir \
torch \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cu113 && \
fix-permissions "${CONDA_DIR}" && \
fix-permissions "/home/${NB_USER}"
# Other root operations that can't (or maybe just shouldn't)
# be performed until the packages above are installed...
USER root
RUN python -c "import nltk; nltk.download('all','/usr/local/share/nltk_data')"
# Configure extensions (seems unnecessary now)...
# RUN jupyter labextension install jupyterlab-plotly
# RUN python -m bash_kernel.install --sys-prefix
# Custom hook to setup home directory
RUN mkdir /usr/local/bin/before-notebook.d
COPY config-home.sh /usr/local/bin/before-notebook.d/.
# Switch back to user for final env
# configuration...
USER $NB_UID
# Configure user environment (gets copied from /home/jovyan
RUN cp /etc/skel/.bash_logout /etc/skel/.bashrc /etc/skel/.profile /home/${NB_USER}/. && conda init