-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #186 from harshad16/include-manifests
Include notebook imagestream manifests to notebook repos
- Loading branch information
Showing
15 changed files
with
583 additions
and
0 deletions.
There are no files selected for viewing
109 changes: 109 additions & 0 deletions
109
.github/workflows/notebooks-digest-updater-upstream.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
# The aim of this GitHub workflow is to update the params.env file with the latest digest. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
required: true | ||
description: "Provide the name of the branch you want to update ex main, vYYYYx etc" | ||
release-n: | ||
required: true | ||
description: "Provide release N version of the notebooks ex 2023a" | ||
schedule: | ||
- cron: "0 0 * * 5" #Scheduled every Friday | ||
env: | ||
DIGEST_UPDATER_BRANCH: digest-updater-${{ github.run_id }} | ||
BRANCH_NAME: ${{ github.event.inputs.branch || 'main' }} | ||
RELEASE_VERSION: ${{ github.event.inputs.release-n || '2023a' }} | ||
jobs: | ||
initialize: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Install Skopeo CLI | ||
shell: bash | ||
run: | | ||
sudo apt-get -y update | ||
sudo apt-get -y install skopeo | ||
# Checkout the release branch | ||
- name: Checkout release branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.BRANCH_NAME }} | ||
|
||
# Create a new branch | ||
- name: Create a new branch | ||
run: | | ||
echo ${{ env.DIGEST_UPDATER_BRANCH }} | ||
git checkout -b ${{ env.DIGEST_UPDATER_BRANCH }} | ||
git push --set-upstream origin ${{ env.DIGEST_UPDATER_BRANCH }} | ||
update-n-version: | ||
needs: [ initialize ] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Configure Git | ||
run: | | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "GitHub Actions" | ||
# Get the latest weekly build commit hash: https://github.com/opendatahub-io/notebooks/commits/2023a | ||
- name: Checkout upstream notebooks repo | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: opendatahub-io/notebooks.git | ||
ref: ${{ env.RELEASE_VERSION }} | ||
- name: Retrive latest weekly commit hash from the release branch | ||
id: hash | ||
shell: bash | ||
run: | | ||
echo "HASH=$(git rev-parse --short HEAD)" >> ${GITHUB_OUTPUT} | ||
# Checkout the release branch to apply the updates | ||
- name: Checkout release branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ env.DIGEST_UPDATER_BRANCH }} | ||
|
||
- name: Fetch digest, and update the param.env file | ||
run: | | ||
IMAGES=("odh-minimal-notebook-image-n" "odh-minimal-gpu-notebook-image-n" "odh-pytorch-gpu-notebook-image-n" "odh-generic-data-science-notebook-image-n" "odh-tensorflow-gpu-notebook-image-n" "odh-trustyai-notebook-image-n") | ||
for ((i=0;i<${#IMAGES[@]};++i)); do | ||
image=${IMAGES[$i]} | ||
echo $image | ||
img=$(cat manifests/base/params.env | grep -E "${image}=" | cut -d '=' -f2) | ||
registry=$(echo $img | cut -d '@' -f1) | ||
src_tag=$(skopeo inspect docker://$img | jq '.Env[] | select(startswith("OPENSHIFT_BUILD_NAME=")) | split("=")[1]' | tr -d '"') | ||
regex="$src_tag-${{ env.RELEASE_VERSION}}-\d+-${{ steps.hash.outputs.HASH }}" | ||
latest_tag=$(skopeo inspect docker://$img | jq -r --arg regex "$regex" '.RepoTags | map(select(. | test($regex))) | .[0]') | ||
digest=$(skopeo inspect docker://$registry:$latest_tag | jq .Digest | tr -d '"') | ||
output=$registry@$digest | ||
echo $output | ||
sed -i "s|${image}=.*|${image}=$output|" manifests/base/params.env | ||
done | ||
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/params.env && git commit -m "Update file via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }} | ||
open-pull-request: | ||
needs: [ update-n-version ] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
- name: pull-request | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ env.DIGEST_UPDATER_BRANCH }} | ||
destination_branch: ${{ env.BRANCH_NAME}} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
pr_label: "automated pr" | ||
pr_title: "[Digest Updater Action] Update notebook's imageStreams image tag to digest format" | ||
pr_body: | | ||
:rocket: This is a automated PR | ||
_Created by `/.github/workflows/digest-updater.yaml` | ||
:exclamation: **IMPORTANT NOTE**: Remember to delete the ` ${{ env.DIGEST_UPDATER_BRANCH }}` branch after merging the changes |
38 changes: 38 additions & 0 deletions
38
manifests/base/jupyter-datascience-notebook-imagestream.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/jupyter/datascience" | ||
opendatahub.io/notebook-image-name: "Jupyter Data Science" | ||
opendatahub.io/notebook-image-desc: "Jupyter notebook image with a set of data science libraries that advanced AI/ML notebooks will use as a base image to provide a standard for libraries avialable in all notebooks" | ||
opendatahub.io/notebook-image-order: "2" | ||
name: jupyter-datascience-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
# N Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"Boto3","version":"1.26"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.2"},{"name":"Scipy","version":"1.10"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
opendatahub.io/workbench-image-recommended: 'true' | ||
from: | ||
kind: DockerImage | ||
name: $(odh-generic-data-science-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source | ||
# N-1 Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.8"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"Boto3","version":"1.17"},{"name":"Kafka-Python","version":"2.0"},{"name":"Matplotlib","version":"3.4"},{"name":"Numpy","version":"1.19"},{"name":"Pandas","version":"1.2"},{"name":"Scikit-learn","version":"0.24"},{"name":"Scipy","version":"1.6"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/notebooks | ||
from: | ||
kind: DockerImage | ||
name: $(odh-generic-data-science-notebook-image-n-1) | ||
name: "1.2" | ||
referencePolicy: | ||
type: Source |
39 changes: 39 additions & 0 deletions
39
manifests/base/jupyter-minimal-gpu-notebook-imagestream.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com/opendatahub-io/notebooks/tree/main/jupyter/minimal" | ||
opendatahub.io/notebook-image-name: "CUDA" | ||
opendatahub.io/notebook-image-desc: "Jupyter notebook image with GPU support and minimal dependency set to start experimenting with Jupyter environment." | ||
opendatahub.io/notebook-image-order: "3" | ||
opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]' | ||
name: jupyter-minimal-gpu-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
# N Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.8"},{"name":"Python","version":"v3.9"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"JupyterLab","version":"3.5"},{"name":"Notebook","version":"6.5"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
opendatahub.io/workbench-image-recommended: 'true' | ||
from: | ||
kind: DockerImage | ||
name: $(odh-minimal-gpu-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source | ||
# N-1 Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.4"},{"name":"Python","version":"v3.8"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"JupyterLab","version":"3.2"},{"name":"Notebook","version":"6.4"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/notebooks | ||
from: | ||
kind: DockerImage | ||
name: $(odh-minimal-gpu-notebook-image-n-1) | ||
name: "1.2" | ||
referencePolicy: | ||
type: Source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/jupyter/minimal" | ||
opendatahub.io/notebook-image-name: "Minimal Python" | ||
opendatahub.io/notebook-image-desc: "Jupyter notebook image with minimal dependency set to start experimenting with Jupyter environment." | ||
opendatahub.io/notebook-image-order: "1" | ||
name: jupyter-minimal-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
# N Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"JupyterLab","version": "3.5"}, {"name": "Notebook","version": "6.5"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
opendatahub.io/workbench-image-recommended: 'true' | ||
opendatahub.io/default-image: "true" | ||
from: | ||
kind: DockerImage | ||
name: $(odh-minimal-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source | ||
# N-1 Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.8"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"JupyterLab","version": "3.2"}, {"name": "Notebook","version": "6.4"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/notebooks | ||
from: | ||
kind: DockerImage | ||
name: $(odh-minimal-notebook-image-n-1) | ||
name: "1.2" | ||
referencePolicy: | ||
type: Source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com/opendatahub-io/notebooks/blob/main/jupyter/pytorch" | ||
opendatahub.io/notebook-image-name: "PyTorch" | ||
opendatahub.io/notebook-image-desc: "Jupyter notebook image with PyTorch libraries and dependencies to start experimenting with advanced AI/ML notebooks." | ||
opendatahub.io/notebook-image-order: "4" | ||
opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]' | ||
name: jupyter-pytorch-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
# N Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.8"},{"name":"Python","version":"v3.9"},{"name":"PyTorch","version":"1.13"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"PyTorch","version":"1.13"},{"name":"Tensorboard","version":"2.11"},{"name":"Boto3","version":"1.26"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.2"},{"name":"Scipy","version":"1.10"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
opendatahub.io/workbench-image-recommended: 'true' | ||
from: | ||
kind: DockerImage | ||
name: $(odh-pytorch-gpu-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source | ||
# N-1 Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.4"},{"name":"Python","version":"v3.8"},{"name":"PyTorch","version":"1.8"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"PyTorch","version":"1.8"},{"name":"Tensorboard","version":"2.6"},{"name":"Boto3","version":"1.17"},{"name":"Kafka-Python","version":"2.0"},{"name":"Matplotlib","version":"3.4"},{"name":"Numpy","version":"1.19"},{"name":"Pandas","version":"1.2"},{"name":"Scikit-learn","version":"0.24"},{"name":"Scipy","version":"1.6"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/notebooks | ||
from: | ||
kind: DockerImage | ||
name: $(odh-pytorch-gpu-notebook-image-n-1) | ||
name: "1.2" | ||
referencePolicy: | ||
type: Source |
39 changes: 39 additions & 0 deletions
39
manifests/base/jupyter-tensorflow-notebook-imagestream.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com/opendatahub-io/notebooks/blob/main/jupyter/tensorflow" | ||
opendatahub.io/notebook-image-name: "TensorFlow" | ||
opendatahub.io/notebook-image-desc: "Jupyter notebook image with TensorFlow libraries and dependencies to start experimenting with advanced AI/ML notebooks." | ||
opendatahub.io/notebook-image-order: "5" | ||
opendatahub.io/recommended-accelerators: '["nvidia.com/gpu"]' | ||
name: jupyter-tensorflow-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
# N Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.8"},{"name":"Python","version":"v3.9"},{"name":"TensorFlow","version":"2.11"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"TensorFlow","version":"2.11"},{"name":"Tensorboard","version":"2.11"},{"name":"Boto3","version":"1.26"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.2"},{"name":"Scipy","version":"1.10"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
opendatahub.io/workbench-image-recommended: 'true' | ||
from: | ||
kind: DockerImage | ||
name: $(odh-tensorflow-gpu-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source | ||
# N-1 Version of the image | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"CUDA","version":"11.4"},{"name":"Python","version":"v3.8"},{"name":"TensorFlow","version":"2.7"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"TensorFlow","version":"2.7"},{"name":"Tensorboard","version":"2.6"},{"name":"Boto3","version":"1.17"},{"name":"Kafka-Python","version":"2.0"},{"name":"Matplotlib","version":"3.4"},{"name":"Numpy","version":"1.19"},{"name":"Pandas","version":"1.2"},{"name":"Scikit-learn","version":"0.24"},{"name":"Scipy","version":"1.6"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/notebooks | ||
from: | ||
kind: DockerImage | ||
name: $(odh-tensorflow-gpu-notebook-image-n-1) | ||
name: "1.2" | ||
referencePolicy: | ||
type: Source |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: image.openshift.io/v1 | ||
kind: ImageStream | ||
metadata: | ||
labels: | ||
opendatahub.io/notebook-image: "true" | ||
annotations: | ||
opendatahub.io/notebook-image-url: "https://github.com//opendatahub-io/notebooks/tree/main/jupyter/trustyai" | ||
opendatahub.io/notebook-image-name: "TrustyAI" | ||
opendatahub.io/notebook-image-desc: "Jupyter TrustyAI notebook integrates the TrustyAI Explainability Toolkit on Jupyter environment." | ||
opendatahub.io/notebook-image-order: "6" | ||
name: jupyter-trustyai-notebook | ||
spec: | ||
lookupPolicy: | ||
local: true | ||
tags: | ||
- annotations: | ||
opendatahub.io/notebook-software: '[{"name":"Python","version":"v3.9"}]' | ||
opendatahub.io/notebook-python-dependencies: '[{"name":"TrustyAI","version":"0.2"}, {"name":"Boto3","version":"1.26"},{"name":"Kafka-Python","version":"2.0"},{"name":"Kfp-tekton","version":"1.5"},{"name":"Matplotlib","version":"3.6"},{"name":"Numpy","version":"1.24"},{"name":"Pandas","version":"1.5"},{"name":"Scikit-learn","version":"1.2"},{"name":"Scipy","version":"1.10"}]' | ||
openshift.io/imported-from: quay.io/opendatahub/workbench-images | ||
from: | ||
kind: DockerImage | ||
name: $(odh-trustyai-notebook-image-n) | ||
name: "2023.1" | ||
referencePolicy: | ||
type: Source |
Oops, something went wrong.