-
Order an OpenShift Cluster using the TAP catalog item
-
Tick the checkbox to enable RHOAI
-
From the command line, login as a cluster administrator
-
Add the puller DaemonSet
oc apply -f ./setup/rhoai-config/images-puller.yaml
-
Add the additional Triton server
oc apply -f ./setup/rhoai-config/template-modelmesh-triton.yaml
-
Create the workspace
image-generation
oc apply -f ./setup/image-gen/ds-project.yaml
-
Wait for project to be created
-
Setup and configure Minio to enable the S3 storage
oc apply -n image-generation -f ./setup/image-gen/setup-s3.yaml
-
Wait for job to finish
-
Change the default storage remove cepth
oc patch storageclass ocs-storagecluster-ceph-rbd -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'
-
Make gp3 the default one
oc patch storageclass gp3-csi -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
-
Create a new Workbench:
- Go to Openshift AI (from the OpenShift console view, click on the applications menu in the top right, then select Red Hat OpenShift AI).
- Then Go to Data Science Projects. Select the "image generation" project, then go to "Create workbench".
- From there, select the PyTorch image, GPU accelerator, and use the
My Storage
data connection. Select "Medium" for container size.
-
Launch the newly created image-generation workbench, and clone the repo
https://github.com/cfchase/text-to-image-demo.git
. (go to the git menu in the menu bar) -
Go to Red Hat Developer Hub. In the Catalog view, click "Create", "Register Existing Component" and add template from the following url:
https://github.com/redhat-developer-demos/where-is-teddy/blob/main/scaffolder-templates/wheres-teddy/template.yaml
-
Register the serving runtime in Openshift AI > Settings > Serving Runtimes:
- Select "Single Model Serving Platform"
- API Protocol: REST
- In the "Add Serving Runtime" select "from scratch" and past the contents of https://github.com/cfchase/text-to-image-demo/blob/main/diffusers-runtime/templates/serving-runtime.yaml
-
Go back to the image-generation workbench and open run through the 3 notebooks of the demo:
- 1_experimentation.ipynb
- 2_fine_tuning.ipynb
- 3_remote_inferencing.ipynb
-
Deploy the model using the values from the notebook and the registered serving runtime (use custom resources 1Gb 1 CPU)
-
Register the API entity from the following url:
https://github.com/redhat-developer-demos/where-is-teddy/blob/main/genai-photo-generator-api/catalog-info.yaml
-
Create a new component using the software template from Developer Hub