-
Notifications
You must be signed in to change notification settings - Fork 6
/
pbj-workbench-python3.9-cuda.Dockerfile
162 lines (129 loc) · 4.69 KB
/
pbj-workbench-python3.9-cuda.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
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Copyright 2024 Cloudera. All Rights Reserved.
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu20.04
RUN apt-key del 7fa2af80 && apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
RUN \
addgroup --gid 8536 cdsw && \
adduser --disabled-password --gecos "CDSW User" --uid 8536 --gid 8536 cdsw
RUN for i in /etc /etc/alternatives; do \
if [ -d ${i} ]; then chmod 777 ${i}; fi; \
done
RUN chown cdsw /
RUN for i in /bin /etc /opt /sbin /usr; do \
if [ -d ${i} ]; then \
chown cdsw ${i}; \
find ${i} -type d -exec chown cdsw {} +; \
fi; \
done
WORKDIR /
ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=en_US.UTF-8 LANG=C.UTF-8 LANGUAGE=en_US.UTF-8 \
TERM=xterm
RUN apt-get update && apt-get dist-upgrade -y && \
apt-get update && apt-get install -y --no-install-recommends \
locales \
apt-transport-https \
krb5-user \
xz-utils \
git \
ssh \
unzip \
gzip \
curl \
nano \
emacs-nox \
wget \
ca-certificates \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libssl-dev \
libsasl2-dev \
libsasl2-2 \
libsasl2-modules-gssapi-mit \
libzmq3-dev \
cpio \
cmake \
make \
libgl-dev \
libjpeg-dev \
libpng-dev \
ffmpeg \
fonts-roboto \
fonts-dejavu && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* && \
rm -f /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_rsa_key && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
RUN wget https://packagecloud.io/github/git-lfs/packages/ubuntu/focal/git-lfs_3.5.1_amd64.deb/download.deb?distro_version_id=210 -O git-lfs.deb && \
echo "9eb957a155c088bfe68f4fcf051896d8321c5bc255f3dadea8f42ad8903bf22ef1803583f175a5d55fe68d359779ed1b566e7a86c77d91c272196ee50cc913fc git-lfs.deb" | sha512sum -c - && \
dpkg -i git-lfs.deb && \
rm git-lfs.deb
RUN rm -f /etc/krb5.conf
RUN mkdir -p /etc/pki/tls/certs
RUN ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
RUN ln -s /usr/lib/x86_64-linux-gnu/libsasl2.so.2 /usr/lib/x86_64-linux-gnu/libsasl2.so.3
ENV PATH /home/cdsw/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/conda/bin
ENV SHELL /bin/bash
ENV HADOOP_ROOT_LOGGER WARN,console
WORKDIR /build
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
libsqlite3-0 \
mime-support \
libpq-dev \
gcc \
g++ \
libkrb5-dev \
&& \
rm -rf /var/lib/apt/lists/*
ENV PYTHON3_VERSION=3.9.19 \
ML_RUNTIME_KERNEL="Python 3.9"
ADD build/python-prebuilt-3.9.19-20240911-pkg.tar.gz /usr/local
COPY etc/pip.conf /etc/pip.conf
COPY requirements/python-standard-packages/requirements-3.9.txt /build/requirements.txt
RUN \
ldconfig && \
pip3 config set install.user false && \
pip3 install \
--no-cache-dir \
--no-warn-script-location \
-r requirements.txt && \
rm -rf /build
ENV ML_RUNTIME_EDITOR="PBJ Workbench" \
ML_RUNTIME_EDITION="Standard" \
ML_RUNTIME_JUPYTER_KERNEL_GATEWAY_CMD="jupyter kernelgateway --config=/home/cdsw/.jupyter/jupyter_kernel_gateway_config.py" \
JUPYTERLAB_WORKSPACES_DIR=/tmp
COPY requirements/pbj-workbench-base/requirements-3.9.txt /build/requirements.txt
COPY etc/cloudera.mplstyle /etc/cloudera.mplstyle
RUN pip3 install \
--no-cache-dir \
--no-warn-script-location \
-r /build/requirements.txt && \
rm -rf /build
ENV ML_RUNTIME_JUPYTER_KERNEL_NAME="python3" \
ML_RUNTIME_DESCRIPTION="PBJ Workbench Python runtime provided by Cloudera"
ENV ML_RUNTIME_EDITION="Nvidia GPU" \
ML_RUNTIME_DESCRIPTION="Python runtime with CUDA libraries provided by Cloudera" \
ML_RUNTIME_CUDA_VERSION="12.3.2"
ENV \
ML_RUNTIME_METADATA_VERSION=2 \
ML_RUNTIME_FULL_VERSION=2024.10.1-b12 \
ML_RUNTIME_SHORT_VERSION=2024.10 \
ML_RUNTIME_MAINTENANCE_VERSION=1 \
ML_RUNTIME_GIT_HASH=4df8dd6a570d064ae82eb85bf11e83af604ea575 \
ML_RUNTIME_GBN=59080887
LABEL \
com.cloudera.ml.runtime.runtime-metadata-version=$ML_RUNTIME_METADATA_VERSION \
com.cloudera.ml.runtime.editor=$ML_RUNTIME_EDITOR \
com.cloudera.ml.runtime.edition=$ML_RUNTIME_EDITION \
com.cloudera.ml.runtime.description=$ML_RUNTIME_DESCRIPTION \
com.cloudera.ml.runtime.kernel=$ML_RUNTIME_KERNEL \
com.cloudera.ml.runtime.full-version=$ML_RUNTIME_FULL_VERSION \
com.cloudera.ml.runtime.short-version=$ML_RUNTIME_SHORT_VERSION \
com.cloudera.ml.runtime.maintenance-version=$ML_RUNTIME_MAINTENANCE_VERSION \
com.cloudera.ml.runtime.git-hash=$ML_RUNTIME_GIT_HASH \
com.cloudera.ml.runtime.gbn=$ML_RUNTIME_GBN \
com.cloudera.ml.runtime.cuda-version=$ML_RUNTIME_CUDA_VERSION
WORKDIR /home/cdsw