Skip to content

Commit c2d1a98

Browse files
authored
Add TrustyAI on ODH (opendatahub-io#51)
1 parent b13ac57 commit c2d1a98

File tree

8 files changed

+3633
-0
lines changed

8 files changed

+3633
-0
lines changed

Diff for: Makefile

+7
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ cuda-jupyter-datascience-ubi9-python-3.9: cuda-jupyter-minimal-ubi9-python-3.9
121121
cuda-jupyter-tensorflow-ubi9-python-3.9: cuda-jupyter-datascience-ubi9-python-3.9
122122
$(call image,$@,jupyter/tensorflow/ubi9-python-3.9,$<)
123123

124+
# Build and push jupyter-trustyai-ubi9-python-3.9 image to the registry
125+
.PHONY: jupyter-trustyai-ubi9-python-3.9
126+
jupyter-trustyai-ubi9-python-3.9: jupyter-datascience-ubi9-python-3.9
127+
$(call image,$@,jupyter/trustyai/ubi9-python-3.9,$<)
128+
124129
# Download kubectl binary
125130
.PHONY: bin/kubectl
126131
bin/kubectl:
@@ -192,3 +197,5 @@ refresh-pipfilelock-files:
192197
cd jupyter/pytorch/ubi8-python-3.8 && pipenv lock
193198
cd jupyter/tensorflow/ubi8-python-3.8 && pipenv lock
194199
cd jupyter/tensorflow/ubi9-python-3.9 && pipenv lock
200+
cd jupyter/trustyai/ubi9-python-3.9 && pipenv lock
201+

Diff for: README.md

+3
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ graph TB
5151
jupyter-minimal-ubi9-python-3.9("Minimal Notebook<br/>(jupyter-minimal-ubi9-python-3.9)");
5252
jupyter-datascience-ubi9-python-3.9("Data Science Notebook<br/>(jupyter-datascience-ubi9-python-3.9)");
5353
jupyter-pytorch-ubi9-python-3.9("PyTorch Notebook<br/>(jupyter-pytorch-ubi9-python-3.9)");
54+
jupyter-trustyai-ubi9-python-3.9("TrustyAI Notebook<br/>(jupyter-trustyai-ubi9-python-3.9)");
5455
5556
%% Edges
5657
ubi9-python-3.9 --> base-ubi9-python-3.9;
5758
base-ubi9-python-3.9 --> jupyter-minimal-ubi9-python-3.9;
5859
jupyter-minimal-ubi9-python-3.9 --> jupyter-datascience-ubi9-python-3.9;
5960
jupyter-datascience-ubi9-python-3.9 --> jupyter-pytorch-ubi9-python-3.9;
61+
jupyter-datascience-ubi9-python-3.9 --> jupyter-trustyai-ubi9-python-3.9;
6062
end
6163
6264
subgraph CUDA
@@ -91,6 +93,7 @@ The following notebook images are available:
9193
- jupyter-minimal-ubi9-python-3.9
9294
- jupyter-datascience-ubi9-python-3.9
9395
- jupyter-pytorch-ubi9-python-3.9
96+
- jupyter-trustyai-ubi9-python-3.9
9497
- cuda-jupyter-minimal-ubi9-python-3.9
9598
- cuda-jupyter-datascience-ubi9-python-3.9
9699
- cuda-jupyter-tensorflow-ubi9-python-3.9

Diff for: jupyter/trustyai/ubi9-python-3.9/Dockerfile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
ARG BASE_IMAGE
2+
FROM ${BASE_IMAGE}
3+
4+
LABEL name="odh-notebook-jupyter-trustyai-ubi9-python-3.9" \
5+
summary="Jupyter trustyai notebook image for ODH notebooks" \
6+
description="Jupyter trustyai notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
7+
io.k8s.display-name="Jupyter trustyai notebook image for ODH notebooks" \
8+
io.k8s.description="Jupyter trustyai notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
9+
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
10+
io.openshift.build.commit.ref="main" \
11+
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/trustyai/ubi9-python-3.9" \
12+
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-trustyai-ubi9-python-3.9"
13+
14+
USER 0
15+
16+
# Install jre that is needed to run the trustyai library
17+
RUN INSTALL_PKGS="java-11-openjdk" && \
18+
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
19+
yum -y clean all --enablerepo='*'
20+
21+
USER 1001
22+
23+
# Install Python packages and Jupyterlab extensions from Pipfile.lock
24+
COPY Pipfile.lock ./
25+
26+
RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock
27+
28+
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
29+
RUN sed -i -e "s/Python.*/$(python --version)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json
30+
31+
# Fix permissions to support pip in Openshift environments
32+
RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
33+
fix-permissions /opt/app-root -P

Diff for: jupyter/trustyai/ubi9-python-3.9/Pipfile

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[dev-packages]
7+
8+
[packages]
9+
# TrustyAI and useful extensions
10+
trustyai = "==0.2.9"
11+
12+
# Parent image requirements to maintain cohesion
13+
boto3 = "~=1.26.69"
14+
jupyter-bokeh = "~=3.0.5"
15+
elyra-python-editor-extension = "~=3.14.2"
16+
kafka-python = "~=2.0.2"
17+
matplotlib = "~=3.6.3"
18+
numpy = "~=1.24.1"
19+
pandas = "~=1.5.3"
20+
plotly = "~=5.13.0"
21+
scikit-learn = "~=1.2.1"
22+
scipy = "~=1.10.0"
23+
jupyterlab-lsp = "~=3.10.2"
24+
jupyterlab-widgets = "~=3.0.5"
25+
jupyter-resource-usage = "~=0.6.0"
26+
jupyterlab-s3-browser = "~=0.10.1"
27+
28+
# ---
29+
jupyterlab = "~=3.5.3"
30+
jupyter-server = "~=2.1.0"
31+
jupyter-server-proxy = "~=3.2.2"
32+
jupyter-server-terminals = "~=0.4.4"
33+
jupyterlab-git = "~=0.41.0"
34+
nbdime = "~=3.1.1"
35+
nbgitpuller = "~=1.1.1"
36+
# ---
37+
thamos = "~=1.29.1"
38+
wheel = "~=0.38.4"
39+
40+
[requires]
41+
python_version = "3.9"

0 commit comments

Comments
 (0)