-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpbj-workbench-scala2.12-standard.Dockerfile
169 lines (148 loc) · 5.55 KB
/
pbj-workbench-scala2.12-standard.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
163
164
165
166
167
168
169
# Copyright 2025 Cloudera. All Rights Reserved.
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=en_US.UTF-8 LANG=C.UTF-8 LANGUAGE=en_US.UTF-8 \
TERM=xterm \
PATH=/home/cdsw/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/conda/bin \
SHELL=/bin/bash \
HADOOP_ROOT_LOGGER=WARN,console
RUN apt-get update && apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
locales \
gpg \
apt-transport-https \
krb5-user \
xz-utils \
git \
git-lfs \
ssh \
zip \
unzip \
gzip \
curl \
nano \
emacs-nox \
wget \
less \
ca-certificates ca-certificates-java \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libssl-dev \
libsasl2-dev \
libsasl2-2 \
libsasl2-modules-gssapi-mit \
libzmq3-dev \
cpio \
cmake \
build-essential \
patch autoconf automake \
libgl-dev \
libjpeg-dev \
libpng-dev \
ffmpeg \
fonts-roboto \
fonts-dejavu && \
apt-get clean && \
apt-get autoremove --purge && \
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 && \
addgroup --gid 8536 cdsw && \
adduser --disabled-password --comment "CDSW User" --uid 8536 --gid 8536 cdsw && \
for i in /etc /etc/alternatives; do \
if [ -d ${i} ]; then chmod 777 ${i}; fi; \
done && \
chown cdsw / && \
for i in /bin /etc /opt /sbin /usr; do \
if [ -d ${i} ]; then \
find ${i} -type d -exec chown cdsw {} +; \
fi; \
done && \
ln -s /usr/lib/x86_64-linux-gnu/libsasl2.so.2 /usr/lib/x86_64-linux-gnu/libsasl2.so.3 && \
mkdir -p /etc/pki/tls/certs && \
ln -s /etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt
WORKDIR /build
ENV PYTHON3_VERSION=3.12.8 \
ML_RUNTIME_KERNEL="Python 3.12"
RUN \
apt-get update && \
apt-get install -y --no-install-recommends \
libsqlite3-0 \
media-types \
libpq-dev \
libkrb5-dev && \
apt-get autoremove -y --purge && \
apt-get clean && rm -rf /var/lib/apt/lists/*
COPY etc/pip.conf /etc/pip.conf
ADD build/python-prebuilt-3.12.8-20241205-pkg.tar.gz /usr/local
COPY requirements/python-standard-packages/requirements-3.12.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 && \
cd /root && \
rm -rf .cache .ipython .ivy2 .sbt .npm .yarn && \
rm -rf /tmp/*
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.12.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_KERNEL="PBJ Scala 2.12" \
ML_RUNTIME_JUPYTER_KERNEL_NAME="apache_toree_scala" \
ML_RUNTIME_LANGUAGE_EXECUTABLE_PATH="/usr/local/share/chunker/chunker.sh" \
ML_RUNTIME_DESCRIPTION="PBJ Workbench Scala runtime provided by Cloudera"
COPY scala/chunker.sh /usr/local/share/chunker/
COPY scala/chunker /tmp/chunker
COPY scala/toree.patch /tmp
RUN \
echo "deb [signed-by=/etc/apt/trusted.gpg.d/scalasbt-release.gpg] https://repo.scala-sbt.org/scalasbt/debian all main" >/etc/apt/sources.list.d/sbt.list && \
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | gpg --dearmor >/etc/apt/trusted.gpg.d/scalasbt-release.gpg && \
apt-get update && \
apt-get install --no-install-recommends -y sbt && \
apt-get install --no-install-recommends -y openjdk-8-jdk-headless && \
cd /tmp/chunker && \
sbt assembly && \
mv target/scala-2.11/ScalaChunker-assembly-1.1.jar /usr/local/share/chunker && \
cd /tmp && \
git clone https://github.com/apache/incubator-toree.git && \
cd incubator-toree && \
git checkout 1e7e0c058f965eaf09044961af592626ddc0a5cc && \
patch -p1 </tmp/toree.patch && \
ln -s /usr/bin/true /usr/bin/docker && \
make build pip-release && \
rm -f /usr/bin/docker && \
cd dist/toree-pip && \
pip3 install . && \
jupyter toree install --spark_home=/opt/spark && \
apt-get remove -y --purge openjdk-8-jdk-headless && \
cd /root && \
rm -rf .cache .ipython .ivy2 .sbt .npm .yarn && \
apt-get autoremove -y --purge && \
apt-get clean && rm -rf /var/lib/apt/lists/* && \
rm -rf /tmp/*
ENV \
ML_RUNTIME_METADATA_VERSION=2 \
ML_RUNTIME_FULL_VERSION=2025.01.1-b8 \
ML_RUNTIME_SHORT_VERSION=2025.01 \
ML_RUNTIME_MAINTENANCE_VERSION=1 \
ML_RUNTIME_GIT_HASH=604a5dc926b91f8b943b459e5f91ca9a9b45940d \
ML_RUNTIME_GBN=61850987
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