Skip to content

Commit

Permalink
Merge pull request #182 from harshad16/rsync-main
Browse files Browse the repository at this point in the history
sync main branch with the upstream main for feature-freeze 2.9
  • Loading branch information
harshad16 authored Mar 17, 2024
2 parents 72dfc8f + 733502f commit 5332e2b
Show file tree
Hide file tree
Showing 64 changed files with 35,915 additions and 1,474 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,16 @@ codeserver-ubi9-python-3.9: base-ubi9-python-3.9
intel-base-gpu-ubi9-python-3.9: base-ubi9-python-3.9
$(call image,$@,intel/base/gpu/ubi9-python-3.9,$<)

# Build and push intel-runtime-tensorflow-ubi9-python-3.9 image to the registry
.PHONY: intel-runtime-tensorflow-ubi9-python-3.9
intel-runtime-tensorflow-ubi9-python-3.9: intel-base-gpu-ubi9-python-3.9
$(call image,$@,intel/runtimes/tensorflow/ubi9-python-3.9,$<)

# Build and push jupyter-intel-tensorflow-ubi9-python-3.9 image to the registry
.PHONY: jupyter-intel-tensorflow-ubi9-python-3.9
jupyter-intel-tensorflow-ubi9-python-3.9: intel-runtime-tensorflow-ubi9-python-3.9
$(call image,$@,jupyter/intel/tensorflow/ubi9-python-3.9,$<)

# Build and push intel-runtime-pytorch-ubi9-python-3.9 image to the registry
.PHONY: intel-runtime-pytorch-ubi9-python-3.9
intel-runtime-pytorch-ubi9-python-3.9: intel-base-gpu-ubi9-python-3.9
Expand All @@ -202,6 +212,16 @@ intel-runtime-pytorch-ubi9-python-3.9: intel-base-gpu-ubi9-python-3.9
jupyter-intel-pytorch-ubi9-python-3.9: intel-runtime-pytorch-ubi9-python-3.9
$(call image,$@,jupyter/intel/pytorch/ubi9-python-3.9,$<)

# Build and push intel-runtime-ml-ubi9-python-3.9 image to the registry
.PHONY: intel-runtime-ml-ubi9-python-3.9
intel-runtime-ml-ubi9-python-3.9: base-ubi9-python-3.9
$(call image,$@,intel/runtimes/ml/ubi9-python-3.9,$<)

# Build and push jupyter-intel-ml-ubi9-python-3.9 image to the registry
.PHONY: jupyter-intel-ml-ubi9-python-3.9
jupyter-intel-ml-ubi9-python-3.9: intel-runtime-ml-ubi9-python-3.9
$(call image,$@,jupyter/intel/ml/ubi9-python-3.9,$<)

####################################### Buildchain for Python 3.9 using C9S #######################################

# Build and push base-c9s-python-3.9 image to the registry
Expand Down Expand Up @@ -357,6 +377,8 @@ test-%: bin/kubectl
# Tests notebook's functionalities
if echo "$(FULL_NOTEBOOK_NAME)" | grep -q "minimal-ubi9"; then \
$(call test_with_papermill,minimal,ubi9,python-3.9) \
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "intel-tensorflow-ubi9"; then \
$(call test_with_papermill,intel/tensorflow,ubi9,python-3.9) \
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "intel-pytorch-ubi9"; then \
$(call test_with_papermill,intel/pytorch,ubi9,python-3.9) \
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "datascience-ubi9"; then \
Expand All @@ -367,6 +389,8 @@ test-%: bin/kubectl
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "tensorflow-ubi9"; then \
$(MAKE) validate-ubi9-datascience -e FULL_NOTEBOOK_NAME=$(FULL_NOTEBOOK_NAME); \
$(call test_with_papermill,tensorflow,ubi9,python-3.9) \
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "intel-ml-ubi9"; then \
$(call test_with_papermill,intel/ml,ubi9,python-3.9) \
elif echo "$(FULL_NOTEBOOK_NAME)" | grep -q "trustyai-ubi9"; then \
$(MAKE) validate-ubi9-datascience -e FULL_NOTEBOOK_NAME=$(FULL_NOTEBOOK_NAME); \
$(call test_with_papermill,trustyai,ubi9,python-3.9) \
Expand Down
4 changes: 4 additions & 0 deletions intel/runtimes/ml/ubi9-python-3.9/.patch_sklearn.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from sklearnex import patch_sklearn
from sklearnex import unpatch_sklearn
patch_sklearn()
print("To disable Intel(R) Extension for Scikit-learn*, you can run: unpatch_sklearn()")
33 changes: 33 additions & 0 deletions intel/runtimes/ml/ubi9-python-3.9/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-intel-runtime-ml-ubi9-python-3.9" \
summary="Runtime Intel® optimized ML notebook image for ODH notebooks" \
description="Runtime Intel® optimized ML notebook image with base Python 3.9 builder image based on UBI9 for ODH notebooks" \
io.k8s.display-name="Runtime Intel® optimized ML notebook image for ODH notebooks" \
io.k8s.description="Runtime Intel® optimized ML notebook image with base Python 3.9 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/intel/runtimes/ml/ubi9-python-3.9" \
io.openshift.build.image="quay.io/opendatahub/workbench-images:intel-runtime-ml-ubi9-python-3.9"

WORKDIR /opt/app-root/bin

# Install Python packages from Pipfile.lock
COPY Pipfile.lock Pipfile.lock

# Copy Elyra dependencies for air-gapped enviroment
COPY utils utils

COPY --chown=1001:0 .patch_sklearn.py /opt/app-root/bin/.patch_sklearn.py
ENV PYTHONSTARTUP="/opt/app-root/bin/.patch_sklearn.py"

#Virtualenv creates a symlink of lib to lib64. That causes issues with importing ITEX since both locations will have ITEX library and it will conflict.
RUN echo "Installing softwares and packages" && \
micropipenv install && \
rm -f ./Pipfile.lock && \
# Fix permissions to support pip in Openshift environments \
chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \
fix-permissions /opt/app-root -P

WORKDIR /opt/app-root/src
53 changes: 53 additions & 0 deletions intel/runtimes/ml/ubi9-python-3.9/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
# Classical-ML
daal4py = {version="*"}
"modin[ray]" = {version="==0.24.1"}
scikit-learn-intelex = {version="==2024.0.1"}
threadpoolctl = {version="*"}
xgboost = {version="==1.7.3"}

# Datascience and useful extensions
cloud-data-connector = {version="*"}
kafka-python = "~=2.0.2"
matplotlib = "~=3.6.3"
numpy = "~=1.24.3"
pandas = "~=2.1.4"
plotly = "~=5.16.1"
scipy = "~=1.11.2"
scikit-learn = "~=1.3.1"
skl2onnx = "~=1.15.0"
codeflare-sdk = "~=0.13.0"

# DB connectors
pymongo = "~=4.5.0"
psycopg = "~=3.1.10"
pyodbc = "~=4.0.39"
mysql-connector-python = "~=8.0.33"

# This is a comprehensive list of python dependencies that Elyra requires to execute Jupyter notebooks.
ipykernel = "==6.13.0"
ipython = "==8.10.0"
ipython-genutils = "==0.2.0"
jinja2 = "==3.0.3"
jupyter-client = "==7.3.1"
jupyter-core = "==4.11.2"
MarkupSafe = "==2.1.1"
minio = "==7.1.15"
nbclient = "==0.6.3"
nbconvert = "==6.5.1"
nbformat = "==5.4.0"
papermill = "==2.3.4"
pyzmq = "==24.0.1"
prompt-toolkit = "==3.0.30"
requests = "==2.31.0"
tornado = "==6.3.3"
traitlets = "==5.1.1"
urllib3 = "==1.26.9"

[requires]
python_version = "3.9"
Loading

0 comments on commit 5332e2b

Please sign in to comment.