-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.cuda118
141 lines (125 loc) · 3.24 KB
/
Dockerfile.cuda118
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
FROM jupyter/datascience-notebook:2023-06-29
LABEL maintainer="Joshua L. Phillips <https://www.cs.mtsu.edu/~jphillips/>"
LABEL release-date="2023-06-29"
USER root
RUN echo -e "y\ny" | unminimize
# Additional tools
RUN apt-get update && \
apt-get install -y \
autoconf \
curl \
emacs-nox \
enscript \
g++ \
gcc \
gdb \
graphviz \
less \
libtool \
make \
man-db \
nasm \
poppler-utils \
python3-opengl \
rsync \
s3cmd \
ssh \
texlive-science \
time \
tmux \
vim \
wkhtmltopdf \
xvfb \
zip && \
apt-get dist-upgrade -y && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER $NB_UID
## Specific version of bokeh to
## make pip-installed gensim
## happy...
# bokeh==2.3.3 \
# pip install --quiet --no-cache-dir \
# gensim && \
# NOTES 2023-01-16
# keras-nlp - is not in condaforge at
# time of build. Using pip, but two
# depends remained: tensorflow-hub
# and tensorflow-text. Found TF-hub
# in conda, so added that to the
# list of conda packages. TF-text
# is just included as a dependency
# of keras-nlp during the install
# process (just remove tf-hub from
# conda list once keras-nlp finally
# gets added at some point in the
# future).
# The above approach did not work...
# There were incompatible symbols
# and no way to resolve without
# rebuilding. Drop keras-nlp for
# now until it is in conda since
# there seems to be no way to make
# the conda/pip packages play
# nicely together.
# GPU-enabled stack
RUN CONDA_OVERRIDE_CUDA="11.8" mamba install --yes \
bash_kernel \
bokeh \
cudatoolkit==11.8.0 \
cudnn==8.8.0.121 \
dask-gateway \
dask-jobqueue \
dask-mpi \
expect \
gensim \
jupyter-server-proxy \
nltk \
numpy \
plotly \
pydot \
python-graphviz \
stanfordcorenlp \
wandb \
websockify \
xvfbwrapper && \
mamba clean --all -f -y
RUN pip install --no-cache-dir \
deepspeed \
gym \
keras-tuner \
keras-cv \
keras-nlp \
nvidia-tensorrt \
tensorflow \
lightning \
torch \
torchinfo \
torchview \
torchmetrics \
torchvision \
torchaudio \
--extra-index-url https://download.pytorch.org/whl/cu118
# Note that we cannot clean mamba after
# this point - or it will remove the dev
# tools from the stack...
RUN mamba install --yes \
cudatoolkit-dev==11.7.0 && \
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')"
# Custom hook to setup home directory
RUN mkdir /usr/local/bin/before-notebook.d
COPY config-home.sh /usr/local/bin/before-notebook.d/.
# Set system to use libraries in
# /opt/conda/lib (nvidia-cuda)
RUN echo -e "/opt/conda/lib" | tee /etc/ld.so.conf.d/conda.conf
# Switch back to user for final env
# configuration...
USER $NB_UID
# Configure user environment (needed for singularity/apptainer)
RUN cp /etc/skel/.bash_logout /etc/skel/.bashrc /etc/skel/.profile /home/${NB_USER}/. && conda init