Skip to content

Commit e504829

Browse files
committed
creating jupyter datascience python 3.12 image
1 parent 14c4e5d commit e504829

17 files changed

+8431
-0
lines changed
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
######################################################
2+
# mongocli-builder (build stage only, not published) #
3+
######################################################
4+
FROM registry.access.redhat.com/ubi9/go-toolset:latest AS mongocli-builder
5+
6+
ARG MONGOCLI_VERSION=2.0.3
7+
8+
WORKDIR /tmp/
9+
RUN curl -Lo mongodb-cli-mongocli-v${MONGOCLI_VERSION}.zip https://github.com/mongodb/mongodb-cli/archive/refs/tags/mongocli/v${MONGOCLI_VERSION}.zip
10+
RUN unzip ./mongodb-cli-mongocli-v${MONGOCLI_VERSION}.zip
11+
RUN cd ./mongodb-cli-mongocli-v${MONGOCLI_VERSION}/ && \
12+
CGO_ENABLED=1 GOOS=linux go build -a -tags strictfipsruntime -o /tmp/mongocli ./cmd/mongocli/
13+
14+
########################
15+
# base #
16+
########################
17+
FROM registry.access.redhat.com/ubi9/python-312:latest AS base
18+
19+
WORKDIR /opt/app-root/bin
20+
21+
# OS Packages needs to be installed as root
22+
USER root
23+
24+
# Install useful OS packages
25+
RUN dnf install -y mesa-libGL skopeo && dnf clean all && rm -rf /var/cache/yum
26+
27+
# Other apps and tools installed as default user
28+
USER 1001
29+
30+
# Install micropipenv to deploy packages from Pipfile.lock
31+
RUN pip install --no-cache-dir -U "micropipenv[toml]"
32+
33+
# Install the oc client
34+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
35+
-o /tmp/openshift-client-linux.tar.gz && \
36+
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
37+
rm -f /tmp/openshift-client-linux.tar.gz
38+
39+
####################
40+
# jupyter-minimal #
41+
####################
42+
FROM base AS jupyter-minimal
43+
44+
ARG JUPYTER_REUSABLE_UTILS=jupyter/utils
45+
ARG MINIMAL_SOURCE_CODE=jupyter/minimal/ubi9-python-3.12
46+
47+
WORKDIR /opt/app-root/bin
48+
49+
COPY ${JUPYTER_REUSABLE_UTILS} utils/
50+
COPY ${MINIMAL_SOURCE_CODE}/start-notebook.sh ./
51+
52+
WORKDIR /opt/app-root/src
53+
54+
ENTRYPOINT ["start-notebook.sh"]
55+
56+
57+
########################
58+
# jupytyer-datascience #
59+
########################
60+
FROM jupyter-minimal AS jupyter-datascience
61+
62+
ARG DATASCIENCE_SOURCE_CODE=jupyter/datascience/ubi9-python-3.12
63+
64+
LABEL name="odh-notebook-jupyter-datascience-ubi9-python-3.12" \
65+
summary="Jupyter data science notebook image for ODH notebooks" \
66+
description="Jupyter data science notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
67+
io.k8s.display-name="Jupyter data science notebook image for ODH notebooks" \
68+
io.k8s.description="Jupyter data science notebook image with base Python 3.12 builder image based on UBI9 for ODH notebooks" \
69+
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
70+
io.openshift.build.commit.ref="main" \
71+
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/datascience/ubi9-python-3.12" \
72+
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-datascience-ubi9-python-3.12"
73+
74+
WORKDIR /opt/app-root/bin
75+
76+
# OS Packages needs to be installed as root
77+
USER root
78+
79+
# Install useful OS packages
80+
RUN dnf install -y jq unixODBC postgresql git-lfs libsndfile && dnf clean all && rm -rf /var/cache/yum
81+
82+
# Copy dynamically-linked mongocli built in earlier build stage
83+
COPY --from=mongocli-builder /tmp/mongocli /opt/app-root/bin/
84+
85+
# Install MSSQL Client, We need a special repo for MSSQL as they do their own distribution
86+
COPY ${DATASCIENCE_SOURCE_CODE}/mssql-2022.repo-x86_64 /etc/yum.repos.d/mssql-2022.repo
87+
88+
RUN ACCEPT_EULA=Y dnf install -y mssql-tools18 unixODBC-devel && dnf clean all && rm -rf /var/cache/yum
89+
90+
ENV PATH="$PATH:/opt/mssql-tools18/bin"
91+
92+
# Other apps and tools installed as default user
93+
USER 1001
94+
95+
# Install Python packages and Jupyterlab extensions from Pipfile.lock
96+
COPY ${DATASCIENCE_SOURCE_CODE}/Pipfile.lock ./
97+
# Copy Elyra setup to utils so that it's sourced at startup
98+
COPY ${DATASCIENCE_SOURCE_CODE}/setup-elyra.sh ${DATASCIENCE_SOURCE_CODE}/utils ./utils/
99+
100+
RUN echo "Installing softwares and packages" && \
101+
micropipenv install && \
102+
rm -f ./Pipfile.lock && \
103+
# setup path for runtime configuration
104+
mkdir /opt/app-root/runtimes && \
105+
mkdir /opt/app-root/pipeline-runtimes && \
106+
# Remove default Elyra runtime-images \
107+
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
108+
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
109+
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
110+
# Disable announcement plugin of jupyterlab \
111+
jupyter labextension disable "@jupyterlab/apputils-extension:announcements" && \
112+
# Apply JupyterLab addons \
113+
/opt/app-root/bin/utils/addons/apply.sh && \
114+
# Fix permissions to support pip in Openshift environments \
115+
chmod -R g+w /opt/app-root/lib/python3.12/site-packages && \
116+
fix-permissions /opt/app-root -P
117+
118+
WORKDIR /opt/app-root/src
Lines changed: 261 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[dev-packages]
7+
8+
[packages]
9+
wheel = "~=0.45.1"
10+
setuptools = "~=75.8.2"
11+
aiohappyeyeballs = "==2.6.1"
12+
aiohttp = "==3.11.18"
13+
aiohttp-cors = "==0.8.1"
14+
aiosignal = "==1.3.2"
15+
ansicolors = "==1.1.8"
16+
anyio = "==4.9.0"
17+
anyioutils = "==0.7.3"
18+
appengine-python-standard = "==1.1.10"
19+
argon2-cffi = "==23.1.0"
20+
argon2-cffi-bindings = "==21.2.0"
21+
arrow = "==1.3.0"
22+
astroid = "==3.3.10"
23+
asttokens = "==3.0.0"
24+
async-lru = "==2.0.5"
25+
attrs = "==25.3.0"
26+
autopep8 = "==2.0.4"
27+
babel = "==2.17.0"
28+
bcrypt = "==4.3.0"
29+
beautifulsoup4 = "==4.13.4"
30+
black = "==25.1.0"
31+
bleach = {extras = ["css"], version = "==6.2.0"}
32+
bokeh = "==3.8.0.dev1"
33+
boto3 = "==1.37.38"
34+
botocore = "==1.37.38"
35+
cachetools = "==5.5.2"
36+
certifi = "==2025.4.26"
37+
cffi = "==1.17.1"
38+
charset-normalizer = "==3.4.2"
39+
click = "==8.2.0"
40+
codeflare-sdk = "==0.28.1"
41+
colorama = "==0.4.6"
42+
colorful = "==0.6.0a1"
43+
comm = "==0.2.2"
44+
contourpy = "==1.3.2"
45+
cryptography = "==43.0.3"
46+
cycler = "==0.12.1"
47+
debugpy = "==1.8.14"
48+
decorator = "==5.2.1"
49+
defusedxml = "==0.8.0rc2"
50+
deprecated = "==1.2.18"
51+
deprecation = "==2.1.0"
52+
dill = "==0.4.0"
53+
distlib = "==0.3.9"
54+
dnspython = "==2.7.0"
55+
docstring-parser = "==0.16"
56+
docstring-to-markdown = "==0.17"
57+
entrypoints = "==0.4"
58+
executing = "==1.2.0"
59+
fastjsonschema = "==2.21.1"
60+
filelock = "==3.18.0"
61+
flake8 = "==7.1.2"
62+
fonttools = "==4.58.0"
63+
fqdn = "==1.5.1"
64+
frozendict = "==2.4.6"
65+
frozenlist = "==1.6.0"
66+
fsspec = "==2025.3.2"
67+
gitdb = "==4.0.12"
68+
gitpython = "==3.1.44"
69+
google-api-core = "==2.25.0rc1"
70+
google-auth = "==2.40.1"
71+
google-cloud-core = "==2.4.3"
72+
google-cloud-storage = "==2.19.0"
73+
google-crc32c = "==1.7.1"
74+
google-resumable-media = "==2.7.2"
75+
googleapis-common-protos = "==1.70.0"
76+
grpcio = "==1.72.0rc1"
77+
h11 = "==0.16.0"
78+
httpcore = "==1.0.9"
79+
httpx = "==0.28.1"
80+
idna = "==3.10"
81+
importlib-metadata = "==8.7.0"
82+
ipykernel = "==7.0.0a1"
83+
ipython = "==9.2.0"
84+
ipython-pygments-lexers = "==1.1.1"
85+
ipywidgets = "==8.1.2"
86+
isoduration = "==20.11.0"
87+
isort = "==6.0.1"
88+
jedi = "==0.19.2"
89+
jinja2 = "==3.1.6"
90+
jmespath = "==1.0.1"
91+
joblib = "==1.5.0"
92+
json5 = "==0.12.0"
93+
jsonpointer = "==3.0.0"
94+
jsonschema = {extras = ["format-nongpl"], version = "==4.23.0"}
95+
jsonschema-specifications = "==2025.4.1"
96+
jupyter-bokeh = "==4.0.5"
97+
jupyter-client = "==8.6.3"
98+
jupyter-core = "==5.7.2"
99+
jupyter-events = "==0.12.0"
100+
jupyter-lsp = "==2.2.5"
101+
jupyter-packaging = "==0.12.3"
102+
jupyter-resource-usage = "==1.1.1"
103+
jupyter-server = "==2.15.0"
104+
jupyter-server-mathjax = "==0.2.6"
105+
jupyter-server-proxy = "==4.4.0"
106+
jupyter-server-terminals = "==0.5.3"
107+
jupyterlab = "==4.2.7"
108+
jupyterlab-git = "==0.50.2"
109+
jupyterlab-lsp = "==5.1.0"
110+
jupyterlab-pygments = "==0.3.0"
111+
jupyterlab-server = "==2.27.3"
112+
jupyterlab-widgets = "==3.0.15"
113+
kafka-python-ng = "==2.2.3"
114+
kfp = "==2.12.2"
115+
kfp-kubernetes = "==1.5.0"
116+
kfp-pipeline-spec = "==0.6.0"
117+
kfp-server-api = "==2.4.0"
118+
kiwisolver = "==1.4.8"
119+
kubeflow-training = "==1.9.2"
120+
kubernetes = "==30.1.0"
121+
legacy-cgi = "==2.6.3"
122+
markdown-it-py = "==3.0.0"
123+
markupsafe = "==3.0.2"
124+
matplotlib = "==3.10.3"
125+
matplotlib-inline = "==0.1.7"
126+
mccabe = "==0.7.0"
127+
mdurl = "==0.1.2"
128+
minio = "==7.2.15"
129+
mistune = "==3.1.3"
130+
mock = "==5.2.0"
131+
msgpack = "==1.1.0"
132+
multidict = "==6.4.3"
133+
mypy-extensions = "==1.1.0"
134+
mysql-connector-python = "==9.2.0"
135+
narwhals = "==1.39.0"
136+
nbclient = "==0.10.2"
137+
nbconvert = "==7.16.6"
138+
nbdime = "==4.0.2"
139+
nbformat = "==5.10.4"
140+
nbgitpuller = "==1.2.2"
141+
nest-asyncio = "==1.6.0"
142+
networkx = "==3.5rc0"
143+
notebook-shim = "==0.2.4"
144+
numpy = "==2.2.5"
145+
oauthlib = "==3.2.2"
146+
odh-elyra = "==4.2.1"
147+
onnx = "==1.18.0"
148+
onnxconverter-common = "==1.13.0"
149+
opencensus = "==0.11.4"
150+
opencensus-context = "==0.2.dev0"
151+
openshift-client = "==1.0.18"
152+
outcome = "==1.3.0.post0"
153+
overrides = "==7.7.0"
154+
packaging = "==25.0"
155+
pandas = "==2.2.3"
156+
pandocfilters = "==1.5.1"
157+
papermill = "==2.6.0"
158+
paramiko = "==3.5.1"
159+
parso = "==0.8.4"
160+
pathspec = "==0.12.1"
161+
pexpect = "==4.9.0"
162+
pillow = "==11.2.1"
163+
platformdirs = "==4.3.8"
164+
plotly = "==6.0.1"
165+
pluggy = "==1.5.0"
166+
prometheus-client = "==0.21.1"
167+
prompt-toolkit = "==3.0.51"
168+
propcache = "==0.3.1"
169+
proto-plus = "==1.26.1"
170+
protobuf = "==4.25.7"
171+
psutil = "==5.9.8"
172+
psycopg = "==3.2.9"
173+
ptyprocess = "==0.7.0"
174+
pure-eval = "==0.2.3"
175+
py-spy = "==0.4.0"
176+
pyarrow = "==20.0.0"
177+
pyasn1 = "==0.6.1"
178+
pyasn1-modules = "==0.4.2"
179+
pycodestyle = "==2.12.1"
180+
pycparser = "==2.22"
181+
pycryptodome = "==3.22.0"
182+
pydantic = "==1.10.22"
183+
pydocstyle = "==6.3.0"
184+
pyflakes = "==3.2.0"
185+
pygithub = "==2.6.1"
186+
pygments = "==2.19.1"
187+
pyjwt = {extras = ["crypto"], version = "==2.10.1"}
188+
pylint = "==3.3.7"
189+
pymongo = "==4.11.3"
190+
pynacl = "==1.5.0"
191+
pyodbc = "==5.2.0"
192+
pyparsing = "==3.2.3"
193+
python-dateutil = "==2.9.0.post0"
194+
python-json-logger = "==4.0.0.dev0"
195+
python-lsp-jsonrpc = "==1.1.2"
196+
python-lsp-server = {extras = ["all"], version = "==1.12.2"}
197+
pytoolconfig = {extras = ["global"], version = "==1.3.1"}
198+
pytz = "==2025.2"
199+
pyyaml = "==6.0.2"
200+
pyzmq = "==26.4.0"
201+
ray = {extras = ["data", "default"], version = "==2.44.1"}
202+
referencing = "==0.36.2"
203+
requests = "==2.32.3"
204+
requests-oauthlib = "==2.0.0"
205+
requests-toolbelt = "==1.0.0"
206+
retrying = "==1.3.4"
207+
rfc3339-validator = "==0.1.4"
208+
rfc3986-validator = "==0.1.1"
209+
rich = "==13.9.4"
210+
rope = "==1.13.0"
211+
rpds-py = "==0.24.0"
212+
rsa = "==4.9.1"
213+
"ruamel.yaml" = "==0.18.10"
214+
"ruamel.yaml.clib" = "==0.2.12"
215+
s3transfer = "==0.11.5"
216+
scikit-learn = "==1.6.1"
217+
scipy = "==1.15.3"
218+
send2trash = "==1.8.3"
219+
simpervisor = "==1.0.0"
220+
six = "==1.17.0"
221+
skl2onnx = "==1.18.0"
222+
smart-open = "==7.1.0"
223+
smmap = "==5.0.2"
224+
sniffio = "==1.3.1"
225+
snowballstemmer = "==3.0.1"
226+
soupsieve = "==2.7"
227+
stack-data = "==0.6.3"
228+
tabulate = "==0.9.0"
229+
tenacity = "==9.1.2"
230+
termcolor = "==2.3.0"
231+
terminado = "==0.18.1"
232+
threadpoolctl = "==3.6.0"
233+
tinycss2 = "==1.4.0"
234+
tomlkit = "==0.13.2"
235+
tornado = "==6.5b1"
236+
tqdm = "==4.67.1"
237+
traitlets = "==5.14.3"
238+
types-python-dateutil = "==2.9.0.20241206"
239+
typing-extensions = "==4.13.2"
240+
tzdata = "==2025.2"
241+
ujson = "==5.10.0"
242+
uri-template = "==1.3.0"
243+
urllib3 = "==1.26.20"
244+
virtualenv = "==20.31.2"
245+
watchdog = "==6.0.0"
246+
wcwidth = "==0.2.13"
247+
webcolors = "==24.11.1"
248+
webencodings = "==0.5.1"
249+
websocket-client = "==1.8.0"
250+
whatthepatch = "==1.0.7"
251+
widgetsnbextension = "==4.0.14"
252+
wrapt = "==1.17.2"
253+
xyzservices = "==2025.4.0"
254+
yapf = "==0.43.0"
255+
yarl = "==1.20.0"
256+
yaspin = "==3.1.0"
257+
zipp = "==3.21.0"
258+
zmq-anyio = "==0.3.9"
259+
260+
[requires]
261+
python_version = "3.12"

0 commit comments

Comments
 (0)