Skip to content

Commit

Permalink
fix for issue #53
Browse files Browse the repository at this point in the history
  • Loading branch information
rsriniva committed Apr 3, 2024
1 parent ff7e32c commit 63b7e32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions modules/chapter3/pages/custom.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ The default OpenShift AI notebook images can be found in the https://github.com/
Additional images are available at the ODH contributions repository (https://github.com/opendatahub-io-contrib/workbench-images[opendatahub-io-contrib/workbench-images]) This is a place to source additional images, as well as a great resource for best practices for building custom images. Workbench and runtime images are available as well as a script to generate custom images (https://github.com/opendatahub-io-contrib/workbench-images#building-an-image[])

== Exercise
We will now build our own custom image. We'll use https://quay.io/mmurakam/workbenches:fraud-detection-v1.0.1[Fraud Detection Image] as our base image. This image contains artifacts that we will be using later in the course.
We will now build our own custom image. We'll use https://quay.io/modh/cuda-notebooks[CUDA Notebook] as our base image. This image contains artifacts that we will be using later in the course.

We will be adding the *seaborn* python package to the Fraud Detection image. It is a data visualization library based on *matplotlib*.
We will be adding the *seaborn* python package to the base image. It is a data visualization library based on *matplotlib*.

[TIP]
====
Expand All @@ -36,7 +36,7 @@ Containerfile::
[subs=+quotes]
----
#This is the base image we'll be working from
FROM quay.io/mmurakam/workbenches:fraud-detection-v1.0.1 <1>
FROM quay.io/modh/cuda-notebooks <1>
# Copying custom packages
# The requirements.txt file contains additional package dependencies we want installed
Expand All @@ -55,7 +55,7 @@ RUN chmod -R g+w /opt/app-root/lib/python3.9/site-packages && \ <4>
fix-permissions /opt/app-root -P
----
<1> The FROM command contains the base image that we'll be using to build our custom image from. This will already contain common python packages that Data Scientists use and artifacts needed later in the course. Our Fraud Detection image is using [sh]`quay.io/modh/cuda-notebooks:cuda-jupyter-tensorflow-ubi9-python-3.9-2023a-20230714-933b52f` as the base image. You can find more base images at https://quay.io/organization/modh.
<1> The FROM command contains the base image that we'll be using to build our custom image from. This will already contain common python packages that Data Scientists use and artifacts needed later in the course. You can find more base images at https://quay.io/organization/modh.

<2> The COPY command copies a requirements.txt file with the extra package that we will need in our notebook. The requirements.txt file in Python is a text file that lists all the third-party Python packages or libraries that a project depends on. `micropipenv` is a small footprint alternative to pip that allows us to install packages from our requirements.txt file.

Expand Down Expand Up @@ -91,7 +91,7 @@ trino==0.305.0
+
[source, dockerfile]
----
FROM quay.io/mmurakam/workbenches:fraud-detection-v1.0.1
FROM quay.io/modh/cuda-notebooks
----
+
[source, dockerfile]
Expand Down
4 changes: 2 additions & 2 deletions modules/chapter3/pages/importcustom.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
In this section we will go over importing a custom notebook through the OpenShift AI dashboard and test it to make sure our dependencies are included.

== Import the Notebook Image
1. Before we import the image into OpenShif AI we need to set the quay repository we just created to public. In a browser login to quay.io and go to the rhods-admin-custom-image repository. Select the *Settings* gear icon.
1. Before we import the image into OpenShif AI we need to set the quay repository we just created to public. In a browser login to quay.io and go to the *rhods-admin-custom-image* repository. Select the *Settings* gear icon.
+
image::quaySettings.png[Quay Repository Settings]

Expand Down Expand Up @@ -36,7 +36,7 @@ $ oc secrets link default quay-pull-secret --for=pull \
-n redhat-ods-applications
----
For more information, refer to https://docs.openshift.com/container-platform/4.13/openshift_images/image-streams-manage.html#images-imagestream-import-images-private-registry_image-streams-managing[Importing images and image streams from private registries].
For more information, refer to https://docs.openshift.com/container-platform/latest/openshift_images/image-streams-manage.html#images-imagestream-import-images-private-registry_image-streams-managing[Importing images and image streams from private registries].
====

3. Login to the OpenShift AI dashboard as the admin user. Expand *Settings*, click *Notebook Images*, and then click *Import Image*.
Expand Down

0 comments on commit 63b7e32

Please sign in to comment.