Skip to content

Commit

Permalink
Merge pull request #164 from tteofili/trustyai-38
Browse files Browse the repository at this point in the history
Add Jupyter TrustyAI notebook for Python 3.8
  • Loading branch information
harshad16 authored Sep 12, 2023
2 parents 84cb4c6 + bbff022 commit 5b6731f
Show file tree
Hide file tree
Showing 9 changed files with 3,493 additions and 1 deletion.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ cuda-jupyter-tensorflow-ubi8-python-3.8: cuda-jupyter-datascience-ubi8-python-3.
jupyter-pytorch-ubi8-python-3.8: cuda-jupyter-datascience-ubi8-python-3.8
$(call image,$@,jupyter/pytorch/ubi8-python-3.8,$<)

# Build and push jupyter-trustyai-ubi8-python-3.8 image to the registry
.PHONY: jupyter-trustyai-ubi8-python-3.8
jupyter-trustyai-ubi8-python-3.8: jupyter-datascience-ubi9-python-3.9
$(call image,$@,jupyter/trustyai/ubi8-python-3.8,$<)

# Build and push runtime-minimal-ubi8-python-3.8 image to the registry
.PHONY: runtime-minimal-ubi8-python-3.8
runtime-minimal-ubi8-python-3.8: base-ubi8-python-3.8
Expand Down Expand Up @@ -392,6 +397,7 @@ refresh-pipfilelock-files:
cd jupyter/pytorch/ubi8-python-3.8 && pipenv lock
cd jupyter/tensorflow/ubi8-python-3.8 && pipenv lock
cd jupyter/tensorflow/ubi9-python-3.9 && pipenv lock
cd jupyter/trustyai/ubi8-python-3.8 && pipenv lock
cd jupyter/trustyai/ubi9-python-3.9 && pipenv lock
cd runtimes/datascience/ubi8-python-3.8 && pipenv lock
cd runtimes/datascience/ubi9-python-3.9 && pipenv lock
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ graph TB
base-ubi8-python-3.8("Notebooks Base<br/>(base-ubi8-python-3.8)");
jupyter-minimal-ubi8-python-3.8("Minimal Notebook<br/>(jupyter-minimal-ubi8-python-3.8)");
jupyter-datascience-ubi8-python-3.8("Data Science Notebook<br/>(jupyter-datascience-ubi8-python-3.8)");
jupyter-trustyai-ubi8-python-3.8("TrustyAI Notebook<br/>(jupyter-trustyai-ubi8-python-3.8)");
%% Edges
ubi8-python-3.8 --> base-ubi8-python-3.8;
Expand Down Expand Up @@ -125,6 +126,7 @@ The following workbench images are available:
- jupyter-minimal-ubi8-python-3.8
- jupyter-datascience-ubi8-python-3.8
- jupyter-pytorch-ubi8-python-3.8
- jupyter-trustyai-ubi8-python-3.8
- cuda-jupyter-minimal-ubi8-python-3.8
- cuda-jupyter-datascience-ubi8-python-3.8
- cuda-jupyter-tensorflow-ubi8-python-3.8
Expand Down
33 changes: 33 additions & 0 deletions jupyter/trustyai/ubi8-python-3.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

LABEL name="odh-notebook-jupyter-trustyai-ubi8-python-3.8" \
summary="Jupyter trustyai notebook image for ODH notebooks" \
description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI9 for ODH notebooks" \
io.k8s.display-name="Jupyter trustyai notebook image for ODH notebooks" \
io.k8s.description="Jupyter trustyai notebook image with base Python 3.8 builder image based on UBI9 for ODH notebooks" \
authoritative-source-url="https://github.com/opendatahub-io/notebooks" \
io.openshift.build.commit.ref="main" \
io.openshift.build.source-location="https://github.com/opendatahub-io/notebooks/tree/main/jupyter/trustyai/ubi8-python-3.8" \
io.openshift.build.image="quay.io/opendatahub/workbench-images:jupyter-trustyai-ubi8-python-3.8"

USER 0

# Install jre that is needed to run the trustyai library
RUN INSTALL_PKGS="java-17-openjdk" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
yum -y clean all --enablerepo='*'

USER 1001

# Install Python packages and Jupyterlab extensions from Pipfile.lock
COPY Pipfile.lock ./

RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock

# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y
RUN sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json

# Fix permissions to support pip in Openshift environments
RUN chmod -R g+w /opt/app-root/lib/python3.8/site-packages && \
fix-permissions /opt/app-root -P
45 changes: 45 additions & 0 deletions jupyter/trustyai/ubi8-python-3.8/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[packages]
# TrustyAI and useful extensions
trustyai = "~=0.2.12"

# Datascience and useful extensions
elyra-pipeline-editor-extension = "~=3.15.0"
elyra-python-editor-extension = "~=3.15.0"
elyra-code-snippet-extension = "~=3.15.0"
kfp-tekton = "<1.6.0"

# Parent image requirements to maintain cohesion
boto3 = "~=1.26.69"
jupyter-bokeh = "~=3.0.5"
kafka-python = "~=2.0.2"
matplotlib = "~=3.6.3"
numpy = "~=1.24.1"
pandas = "~=1.5.3"
plotly = "~=5.13.0"
scikit-learn = "~=1.2.1"
scipy = "~=1.10.0"
jupyterlab-lsp = "~=3.10.2"
jupyterlab-widgets = "~=3.0.5"
jupyter-resource-usage = "~=0.6.0"
jupyterlab-s3-browser = "~=0.10.1"

# ---
jupyterlab = "~=3.5.3"
jupyter-server = "~=2.1.0"
jupyter-server-proxy = "~=3.2.2"
jupyter-server-terminals = "~=0.4.4"
jupyterlab-git = "~=0.41.0"
nbdime = "~=3.1.1"
nbgitpuller = "~=1.1.1"
# ---
wheel = "~=0.38.4"

[requires]
python_version = "3.8"
Loading

0 comments on commit 5b6731f

Please sign in to comment.