Skip to content

Commit de174d5

Browse files
committed
main merged
2 parents 92fec97 + bb8c8ca commit de174d5

File tree

133 files changed

+23224
-3471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+23224
-3471
lines changed

.github/workflows/code-quality.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,26 @@ jobs:
99
code-static-analysis:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
12+
- uses: actions/checkout@v4
1313

1414
- name: Validate YAML files (best code practices check included)
1515
id: validate-yaml-files
16-
uses: ibiqlik/[email protected]
17-
with:
18-
config_file: ./ci/yamllint-config.yaml
16+
run: |
17+
type yamllint || sudo apt-get -y install yamllint
18+
find . -name "*.yaml" | xargs yamllint --strict --config-file ./ci/yamllint-config.yaml
19+
find . -name "*.yml" | xargs yamllint --strict --config-file ./ci/yamllint-config.yaml
1920
2021
# In some YAML files we use JSON strings, let's check these
2122
- name: Validate JSON strings in YAML files (just syntax)
2223
id: validate-json-strings-in-yaml-files
2324
run: |
24-
type json_verify || sudo apt-get install yajl-tools
25+
type json_verify || sudo apt-get -y install yajl-tools
2526
bash ./ci/check-json.sh
2627
2728
- name: Validate JSON files (just syntax)
2829
id: validate-json-files
2930
run: |
30-
type json_verify || sudo apt-get install yajl-tools
31+
type json_verify || sudo apt-get -y install yajl-tools
3132
shopt -s globstar
3233
ret_code=0
3334
echo "-- Checking a regular '*.json' files"
@@ -40,3 +41,13 @@ jobs:
4041
echo "There were errors in some of the checked files. Please run `json_verify` on such files and fix issues there."
4142
fi
4243
exit "${ret_code}"
44+
45+
- name: Validate Dockerfiles
46+
id: validate-dockerfiles
47+
run: |
48+
type hadolint || sudo apt-get -y install wget \
49+
&& wget --output-document=hadolint https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 \
50+
&& chmod a+x hadolint
51+
echo "Starting Hadolint"
52+
find . -name "Dockerfile" | xargs ./hadolint --config ./ci/hadolint-config.yaml
53+
echo "Hadolint done"

.github/workflows/notebooks-digest-updater-upstream.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on: # yamllint disable-line rule:truthy
1313
env:
1414
DIGEST_UPDATER_BRANCH: digest-updater-${{ github.run_id }}
1515
BRANCH_NAME: ${{ github.event.inputs.branch || 'main' }}
16-
RELEASE_VERSION_N: 2023b
17-
RELEASE_VERSION_N_1: 2023a
16+
RELEASE_VERSION_N: 2024a
17+
RELEASE_VERSION_N_1: 2023b
1818
jobs:
1919
initialize:
2020
runs-on: ubuntu-latest
@@ -51,7 +51,7 @@ jobs:
5151
git config --global user.email "github-actions[bot]@users.noreply.github.com"
5252
git config --global user.name "GitHub Actions"
5353
54-
# Get the latest weekly build commit hash: https://github.com/opendatahub-io/notebooks/commits/2023b
54+
# Get the latest weekly build commit hash: https://github.com/opendatahub-io/notebooks/commits/2024a
5555
- name: Checkout upstream notebooks repo
5656
uses: actions/checkout@v3
5757
with:
@@ -109,7 +109,7 @@ jobs:
109109
git config --global user.email "github-actions[bot]@users.noreply.github.com"
110110
git config --global user.name "GitHub Actions"
111111
112-
# Get the latest weekly build commit hash: https://github.com/opendatahub-io/notebooks/commits/2023a
112+
# Get the latest weekly build commit hash: https://github.com/opendatahub-io/notebooks/commits/2023b
113113
- name: Checkout upstream notebooks repo
114114
uses: actions/checkout@v3
115115
with:
@@ -146,15 +146,16 @@ jobs:
146146
sed -i "s|${image}=.*|${image}=$output|" manifests/base/params.env
147147
done
148148
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/params.env && git commit -m "Update images for release N-1 via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
149+
149150
- name: Fetch digest, and update the commit.env file
150151
run: |
151-
echo Latest commit is: ${{ steps.hash-n.outputs.HASH_N }} on ${{ env.RELEASE_VERSION_N}}
152-
COMMIT=("odh-minimal-notebook-image-commit-n" "odh-minimal-gpu-notebook-image-commit-n" "odh-pytorch-gpu-notebook-image-commit-n" "odh-generic-data-science-notebook-image-commit-n" "odh-tensorflow-gpu-notebook-image-commit-n" "odh-trustyai-notebook-image-commit-n")
152+
echo Latest commit is: ${{ steps.hash-n-1.outputs.HASH_N_1 }} on ${{ env.RELEASE_VERSION_N_1}}
153+
COMMIT=("odh-minimal-notebook-image-commit-n-1" "odh-minimal-gpu-notebook-image-commit-n-1" "odh-pytorch-gpu-notebook-image-commit-n-1" "odh-generic-data-science-notebook-image-commit-n-1" "odh-tensorflow-gpu-notebook-image-commit-n-1" "odh-trustyai-notebook-image-commit-n-1")
153154
for val in "${COMMIT[@]}"; do
154155
echo $val
155-
sed -i "s|${val}=.*|${val}=${{ steps.hash-n.outputs.HASH_N }}|" manifests/base/commit.env
156+
sed -i "s|${val}=.*|${val}=${{ steps.hash-n-1.outputs.HASH_N_1 }}|" manifests/base/commit.env
156157
done
157-
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
158+
git fetch origin ${{ env.DIGEST_UPDATER_BRANCH }} && git pull origin ${{ env.DIGEST_UPDATER_BRANCH }} && git add manifests/base/commit.env && git commit -m "Update image commits for release N-1 via ${{ env.DIGEST_UPDATER_BRANCH }} GitHub action" && git push origin ${{ env.DIGEST_UPDATER_BRANCH }}
158159
# Creates the Pull Request
159160
open-pull-request:
160161
needs: [update-n-version, update-n-1-version]

.github/workflows/params-env.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Validation of params.env content (image SHAs)
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
paths:
6+
- 'manifests/base/params.env'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
validation-of-params-env:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Install dependencies
18+
run: |
19+
sudo apt-get install -y skopeo jq
20+
21+
- name: Validate the 'manifests/base/params.env' file content
22+
run: |
23+
bash ./ci/check-params-env.sh

.github/workflows/sec-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
# The aim of this GitHub workflow is to update the `ci/securitty-scan/security_scan_results.md` with latest security scan results.
33
name: Update notebook image security reports
4-
on:
4+
on: # yamllint disable-line rule:truthy
55
workflow_dispatch:
66
inputs:
77
branch:
88
required: true
99
description: "Provide the name of the branch you want to update ex main, vYYYYx etc: "
1010
schedule:
11-
- cron: "0 0 */21 * 5" #Scheduled every third Friday
11+
- cron: "0 0 */21 * 5" # Scheduled every third Friday
1212
env:
1313
SEC_SCAN_BRANCH: sec-scan-${{ github.run_id }}
1414
BRANCH_NAME: main

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,16 @@ intel-runtime-tensorflow-ubi9-python-3.9: intel-base-gpu-ubi9-python-3.9
202202
jupyter-intel-tensorflow-ubi9-python-3.9: intel-runtime-tensorflow-ubi9-python-3.9
203203
$(call image,$@,jupyter/intel/tensorflow/ubi9-python-3.9,$<)
204204

205+
# Build and push intel-runtime-pytorch-ubi9-python-3.9 image to the registry
206+
.PHONY: intel-runtime-pytorch-ubi9-python-3.9
207+
intel-runtime-pytorch-ubi9-python-3.9: intel-base-gpu-ubi9-python-3.9
208+
$(call image,$@,intel/runtimes/pytorch/ubi9-python-3.9,$<)
209+
210+
# Build and push jupyter-intel-pytorch-ubi9-python-3.9 image to the registry
211+
.PHONY: jupyter-intel-pytorch-ubi9-python-3.9
212+
jupyter-intel-pytorch-ubi9-python-3.9: intel-runtime-pytorch-ubi9-python-3.9
213+
$(call image,$@,jupyter/intel/pytorch/ubi9-python-3.9,$<)
214+
205215
####################################### Buildchain for Python 3.9 using C9S #######################################
206216

207217
# Build and push base-c9s-python-3.9 image to the registry
@@ -352,6 +362,8 @@ test-%: bin/kubectl
352362
$(call test_with_papermill,minimal,ubi9,python-3.9) \
353363
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "intel-tensorflow-ubi9"; then \
354364
$(call test_with_papermill,intel/tensorflow,ubi9,python-3.9) \
365+
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "intel-pytorch-ubi9"; then \
366+
$(call test_with_papermill,intel/pytorch,ubi9,python-3.9) \
355367
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "datascience-ubi9"; then \
356368
$(MAKE) validate-ubi9-datascience -e FULL_NOTEBOOK_NAME=$(FULL_NOTEBOOK_NAME); \
357369
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "pytorch-ubi9"; then \

base/anaconda-python-3.8/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ ENV BASH_ENV="source /opt/anaconda3/bin/activate ${APP_ROOT}" \
7979
USER 1001
8080

8181
# Set the default CMD to print the usage of the language image.
82-
CMD $STI_SCRIPTS_PATH/usage
82+
CMD ["$STI_SCRIPTS_PATH/usage"]
8383

8484

8585
FROM s2i-python-anaconda-38-base
@@ -93,12 +93,12 @@ LABEL name="odh-notebook-base-ubi8-anaconda-python-3.8" \
9393
WORKDIR /opt/app-root/bin
9494

9595
# Install the oc client
96-
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz \
96+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
9797
-o /tmp/openshift-client-linux.tar.gz && \
9898
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
9999
rm -f /tmp/openshift-client-linux.tar.gz
100100

101101
# Fix permissions to support pip in Openshift environments
102102
RUN fix-permissions /opt/app-root -P
103103

104-
WORKDIR /opt/app-root/src
104+
WORKDIR /opt/app-root/src

base/c9s-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LABEL name="odh-notebook-base-centos-stream9-python-3.9" \
1313
WORKDIR /opt/app-root/bin
1414

1515
# Install micropipenv to deploy packages from Pipfile.lock
16-
RUN pip install -U "micropipenv[toml]"
16+
RUN pip install --no-cache-dir -U "micropipenv[toml]"
1717

1818
# Install Python dependencies from Pipfile.lock file
1919
COPY Pipfile.lock ./
@@ -22,14 +22,14 @@ COPY Pipfile.lock ./
2222
USER root
2323

2424
# Install usefull OS packages
25-
RUN dnf install -y mesa-libGL
25+
RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum
2626

2727
# Other apps and tools installed as default user
2828
USER 1001
2929

3030
RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./Pipfile.lock && \
3131
# Install the oc client \
32-
curl -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz \
32+
curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
3333
-o /tmp/openshift-client-linux.tar.gz && \
3434
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
3535
rm -f /tmp/openshift-client-linux.tar.gz && \

base/ubi8-python-3.8/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LABEL name="odh-notebook-base-ubi8-python-3.8" \
1313
WORKDIR /opt/app-root/bin
1414

1515
# Install micropipenv to deploy packages from Pipfile.lock
16-
RUN pip install -U "micropipenv[toml]"
16+
RUN pip install --no-cache-dir -U "micropipenv[toml]"
1717

1818
# Install Python dependencies from Pipfile.lock file
1919
COPY Pipfile.lock ./
@@ -30,7 +30,7 @@ RUN dnf install -y mesa-libGL libnghttp2 && dnf clean all
3030
USER 1001
3131

3232
# Install the oc client
33-
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz \
33+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
3434
-o /tmp/openshift-client-linux.tar.gz && \
3535
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
3636
rm -f /tmp/openshift-client-linux.tar.gz

base/ubi9-python-3.9/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LABEL name="odh-notebook-base-ubi9-python-3.9" \
1313
WORKDIR /opt/app-root/bin
1414

1515
# Install micropipenv to deploy packages from Pipfile.lock
16-
RUN pip install -U "micropipenv[toml]"
16+
RUN pip install --no-cache-dir -U "micropipenv[toml]"
1717

1818
# Install Python dependencies from Pipfile.lock file
1919
COPY Pipfile.lock ./
@@ -24,13 +24,13 @@ RUN echo "Installing softwares and packages" && micropipenv install && rm -f ./P
2424
USER root
2525

2626
# Install usefull OS packages
27-
RUN dnf install -y mesa-libGL
27+
RUN dnf install -y mesa-libGL && dnf clean all && rm -rf /var/cache/yum
2828

2929
# Other apps and tools installed as default user
3030
USER 1001
3131

3232
# Install the oc client
33-
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/stable/openshift-client-linux.tar.gz \
33+
RUN curl -L https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/clients/ocp/stable/openshift-client-linux.tar.gz \
3434
-o /tmp/openshift-client-linux.tar.gz && \
3535
tar -xzvf /tmp/openshift-client-linux.tar.gz oc && \
3636
rm -f /tmp/openshift-client-linux.tar.gz

0 commit comments

Comments
 (0)