Skip to content

Latest commit

 

History

History
79 lines (53 loc) · 2.91 KB

README.md

File metadata and controls

79 lines (53 loc) · 2.91 KB

Where is Teddy?

Setup

  1. Order an OpenShift Cluster using the TAP catalog item

  2. Tick the checkbox to enable RHOAI

  3. From the command line, login as a cluster administrator

  4. Add the puller DaemonSet

    oc apply -f ./setup/rhoai-config/images-puller.yaml
  5. Add the additional Triton server

    oc apply -f ./setup/rhoai-config/template-modelmesh-triton.yaml
  6. Create the workspace image-generation

    oc apply -f ./setup/image-gen/ds-project.yaml
  7. Wait for project to be created

  8. Setup and configure Minio to enable the S3 storage

    oc apply -n image-generation -f ./setup/image-gen/setup-s3.yaml
  9. Wait for job to finish

  10. Change the default storage remove cepth

    oc patch storageclass ocs-storagecluster-ceph-rbd -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "false"}}}'
  11. Make gp3 the default one

    oc patch storageclass gp3-csi -p '{"metadata": {"annotations": {"storageclass.kubernetes.io/is-default-class": "true"}}}'
  12. Create a new Workbench:

    1. Go to Openshift AI (from the OpenShift console view, click on the applications menu in the top right, then select Red Hat OpenShift AI).
    2. Then Go to Data Science Projects. Select the "image generation" project, then go to "Create workbench".
    3. From there, select the PyTorch image, GPU accelerator, and use the My Storage data connection. Select "Medium" for container size.
  13. 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)

  14. 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

  15. Register the serving runtime in Openshift AI > Settings > Serving Runtimes:

    1. Select "Single Model Serving Platform"
    2. API Protocol: REST
    3. 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
  16. Go back to the image-generation workbench and open run through the 3 notebooks of the demo:

    1. 1_experimentation.ipynb
    2. 2_fine_tuning.ipynb
    3. 3_remote_inferencing.ipynb
  17. Deploy the model using the values from the notebook and the registered serving runtime (use custom resources 1Gb 1 CPU)

  18. 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

  19. Create a new component using the software template from Developer Hub