Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update notebooks and containers #151

Merged
merged 1 commit into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 7 additions & 17 deletions bootstrap/ic-rhoai-configuration/images-puller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,7 @@ spec:
spec:
containers:
- name: ic-workbench
image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/ic-workbench:2.1.2
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
limits:
memory: 20Mi
requests:
cpu: 10m
memory: 10Mi
- name: vscode
image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/ic-workbench-vscode:2023c
image: image-registry.openshift-image-registry.svc:5000/redhat-ods-applications/ic-workbench:1.2
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand Down Expand Up @@ -67,7 +57,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: model-server
image: quay.io/modh/openvino_model_server@sha256:5d04d405526ea4ce5b807d0cd199ccf7f71bab1228907c091e975efa770a4908
image: quay.io/opendatahub/openvino_model_server@sha256:2cbe8a48ab0bc6fe7fb76919bf33253e83a6218a9c4b486b744c3dcf30679616
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand All @@ -77,7 +67,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: runtime-adapter
image: registry.redhat.io/rhoai/odh-modelmesh-runtime-adapter-rhel8@sha256:5762982131a5381e582a8952a3ba336b68a1e46257f552a087da6d5a900b8bdf
image: registry.redhat.io/rhoai/odh-modelmesh-runtime-adapter-rhel8@sha256:3d4e39039afe33ae7841258cc4bfe986755b9faefedf8a964f2c3826626d6d09
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand All @@ -87,7 +77,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: modelmesh
image: registry.redhat.io/rhoai/odh-modelmesh-rhel8@sha256:b20c29b1a81e8200a81aab2361af2863889eaa3ea68f4fb19335b97949276a1b
image: registry.redhat.io/rhoai/odh-modelmesh-rhel8@sha256:2eb179e9cd22bf4a85d990508ede72fe279ec92f9ac60dbfe4dbc43f7d444b09
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand Down Expand Up @@ -125,7 +115,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: ds-pipeline-scheduledworkflow-pipelines-definition
image: registry.redhat.io/rhoai/odh-ml-pipelines-scheduledworkflow-rhel8@sha256:3edce9aaa66f349c2291a161686349e0068017c7ad084146f41878f27a6eae74
image: registry.redhat.io/rhoai/odh-ml-pipelines-scheduledworkflow-v2-rhel8@sha256:bd3c7607b526720ab63adc2e84be145ad186575c8ebe4bae99b93292aab6f530
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand All @@ -135,7 +125,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: ds-pipeline-pipelines-definition
image: registry.redhat.io/rhoai/odh-ml-pipelines-api-server-rhel8@sha256:07954372e0e4dff0109d8d2551d059832ad87fb1fe8fbb8a54fa1c0f7878dbc1
image: registry.redhat.io/rhoai/odh-ml-pipelines-api-server-v2-rhel8@sha256:57c0aca35e6ca40f0d2db044decabdd5244c749da1233a04ed585f37566e5caa
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand All @@ -155,7 +145,7 @@ spec:
cpu: 10m
memory: 10Mi
- name: ds-pipeline-persistenceagent-pipelines-definition
image: registry.redhat.io/rhoai/odh-ml-pipelines-persistenceagent-rhel8@sha256:6fdf2b754aea6732ae0757e099ec69fac1cb32e633342a160546ee5b99604af7
image: registry.redhat.io/rhoai/odh-ml-pipelines-persistenceagent-v2-rhel8@sha256:b90b63e3c5de629eb89798d818218104158a5401220397ddbc7072a390e46bdd
command: ["tail"]
args: ["-f", "/dev/null"]
resources:
Expand Down
1 change: 0 additions & 1 deletion bootstrap/ic-rhoai-configuration/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ resources:
- namespace-notebooks.yaml
# wave 1
- workbench-imagestream.yaml
- workbench-vscode-is.yaml
- odhdashboardconfig.yaml
- accelerator-profile.yaml
# wave 2
Expand Down
10 changes: 5 additions & 5 deletions bootstrap/ic-rhoai-configuration/workbench-imagestream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ spec:
lookupPolicy:
local: true
tags:
- name: "2.1.2"
- name: "1.2"
annotations:
opendatahub.io/notebook-python-dependencies: >-
[{"name":"PyTorch","version":"2.2.2"},{"name":"Langchain","version":"0.1.12"},{"name":"Ultralytics","version":"8.1.47"},]
[{"name":"PyTorch","version":"2.2.2"},{"name":"Langchain","version":"0.3.1"},{"name":"Ultralytics","version":"8.2.100"},]
opendatahub.io/notebook-software: >-
[{"name":"Python","version":"v3.11"}]
openshift.io/imported-from: quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-workbench
[{"name":"Python","version":"v3.9"}]
openshift.io/imported-from: quay.io/rh-aiservices-bu/rhoai-lab-parasol-insurance
from:
kind: DockerImage
name: >-
quay.io/rh-aiservices-bu/rhoai-lab-insurance-claim-workbench:2.1.2
quay.io/rh-aiservices-bu/rhoai-lab-parasol-insurance:1.2
importPolicy:
importMode: Legacy
referencePolicy:
Expand Down
40 changes: 0 additions & 40 deletions bootstrap/ic-rhoai-configuration/workbench-vscode-is.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DASHBOARD_ROUTE=https://$(oc get route rhods-dashboard -n redhat-ods-application

# Define some variables
WORKBENCH_NAME="my-workbench"
WORKBENCH_IMAGE="ic-workbench:2.1.2"
WORKBENCH_IMAGE="ic-workbench:1.2"
PIPELINE_ENGINE="Argo"

for i in $(seq 1 $user_count);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DASHBOARD_ROUTE=https://$(oc get route rhods-dashboard -n redhat-ods-application

# Define some variables
WORKBENCH_NAME="my-workbench"
WORKBENCH_IMAGE="ic-workbench:2.1.2"
WORKBENCH_IMAGE="ic-workbench:1.2"
PIPELINE_ENGINE="Tekton"
projects_without_running_pods=()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ DASHBOARD_ROUTE=https://$(oc get route rhods-dashboard -n redhat-ods-application

# Define some variables
WORKBENCH_NAME="my-workbench"
WORKBENCH_IMAGE="ic-workbench:2.1.2"
WORKBENCH_IMAGE="ic-workbench:1.2"
PIPELINE_ENGINE="Tekton"

echo "Generating and apply resources for $USER_NAME..."
Expand Down
81 changes: 6 additions & 75 deletions bootstrap/workbench-image/Containerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,8 @@
FROM quay.io/sclorg/python-311-c9s:c9s
FROM quay.io/modh/odh-generic-data-science-notebook:v2-2024a-20240829

###########################
# Deploy OS Packages #
###########################

USER 0

WORKDIR /opt/app-root/bin/

COPY --chown=1001:0 os-ide/os-packages.txt ./os-ide/os-packages.txt

RUN echo "tsflags=nodocs" | tee -a /etc/yum.conf && \
yum -y update && \
yum install -y yum-utils && \
yum-config-manager --enable crb && \
yum install -y https://download.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
yum install -y $(cat os-ide/os-packages.txt) && \
rm -f os-ide/os-packages.txt && \
yum -y clean all --enablerepo='*' && \
rm -rf /var/cache/dnf && \
find /var/log -type f -name "*.log" -exec rm -f {} \;

#############################################
# End of OS Packages #
#############################################

######################################
# Deploy Python packages and Jupyter #
######################################
##########################
# Deploy Python packages #
##########################

USER 1001

Expand All @@ -36,55 +11,11 @@ WORKDIR /opt/app-root/bin
# Copy packages list
COPY --chown=1001:0 requirements.txt ./

# Copy notebook launcher and utils
COPY --chown=1001:0 utils utils/
COPY --chown=1001:0 start-notebook.sh ./

# Copy Elyra setup to utils so that it's sourced at startup
COPY --chown=1001:0 setup-elyra.sh ./utils/

# Install packages and cleanup
# (all commands are chained to minimize layer size)
RUN echo "Installing softwares and packages" && \
RUN echo "Installing packages" && \
# Install Python packages \
pip install --no-cache-dir --no-dependencies -r requirements.txt && \
# setup path for runtime configuration \
mkdir /opt/app-root/runtimes && \
# switch to Data Science Pipeline \
cp utils/pipeline-flow.svg /opt/app-root/lib/python3.11/site-packages/elyra/static/icons/kubeflow.svg && \
sed -i "s/Kubeflow Pipelines/Data Science/g" /opt/app-root/lib/python3.11/site-packages/elyra/pipeline/runtime_type.py && \
sed -i "s/Kubeflow Pipelines/Data Science Pipelines/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
sed -i "s/kubeflow-service/data-science-pipeline-service/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
sed -i "s/\"default\": \"Argo\",/\"default\": \"Tekton\",/g" /opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/kfp.json && \
# Workaround for passing ssl_sa_cert and to ensure that Elyra redirects to a correct pipeline run URL \
patch /opt/app-root/lib/python3.11/site-packages/elyra/pipeline/kfp/kfp_authentication.py -i utils/kfp_authentication.patch && \
patch /opt/app-root/lib/python3.11/site-packages/elyra/pipeline/kfp/processor_kfp.py -i utils/processor_kfp.patch && \
# switch to Data Science Pipeline in component catalog \
DIR_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-directory-catalog.json" && \
FILE_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/local-file-catalog.json" && \
URL_COMPONENT="/opt/app-root/lib/python3.11/site-packages/elyra/metadata/schemas/url-catalog.json" && \
tmp=$(mktemp) && \
jq '.properties.metadata.properties.runtime_type = input' $DIR_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $DIR_COMPONENT && \
jq '.properties.metadata.properties.runtime_type = input' $FILE_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $FILE_COMPONENT && \
jq '.properties.metadata.properties.runtime_type = input' $URL_COMPONENT utils/component_runtime.json > "$tmp" && mv "$tmp" $URL_COMPONENT && \
sed -i "s/metadata.metadata.runtime_type/\"DATA_SCIENCE_PIPELINES\"/g" /opt/app-root/share/jupyter/labextensions/@elyra/pipeline-editor-extension/static/lib_index_js.*.js && \
# Remove Elyra logo from JupyterLab because this is not a pure Elyra image \
sed -i "s/widget\.id === \x27jp-MainLogo\x27/widget\.id === \x27jp-MainLogo\x27 \&\& false/" /opt/app-root/share/jupyter/labextensions/@elyra/theme-extension/static/lib_index_js.*.js && \
# Replace Notebook's launcher, "(ipykernel)" with Python's version 3.x.y \
sed -i -e "s/Python.*/$(python --version | cut -d '.' -f-2)\",/" /opt/app-root/share/jupyter/kernels/python3/kernel.json && \
# Remove default Elyra runtime-images \
rm /opt/app-root/share/jupyter/metadata/runtime-images/*.json && \
# Fix permissions to support pip in OpenShift environments \
chmod -R g+w /opt/app-root/lib/python3.11/site-packages && \
fix-permissions /opt/app-root -P

# Copy Elyra runtime-images definitions and set the version
COPY --chown=1001:0 runtime-images/ /opt/app-root/share/jupyter/metadata/runtime-images/
RUN sed -i "s/RELEASE/2023c/" /opt/app-root/share/jupyter/metadata/runtime-images/*.json

# Jupyter Server config to allow hidden files/folders in explorer. Ref: https://jupyterlab.readthedocs.io/en/latest/user/files.html#displaying-hidden-files
# Jupyter Lab config to hide disabled exporters (WebPDF, Qtpdf, Qtpng)
COPY --chown=1001:0 etc/ /opt/app-root/etc/jupyter/
pip install --no-cache-dir --no-dependencies -r requirements.txt

WORKDIR /opt/app-root/src

Expand Down
Loading
Loading