kind: ConfigMap
apiVersion: v1
metadata:
  name: ray-singleuser-profile
  labels:
    jupyterhub: singleuser-profiles
data:
  jupyterhub-singleuser-profiles.yaml: |
    profiles:
    - name: Ray Notebook
      images:
      - 'ray-ml-notebook:demo'
      env:
        # this is a workaround that may not be neccesary in the future
        - name: RAY_CLIENT_MODE
          value: '1'
        - name: RAY_DASH_URL
          value: 'http://$(RAY_DASH_HOST)'
      services:
        ray-cluster:
          resources:
          - name: ray-cluster-template
            path: rayClusterResourceTemplate
          - name: ray-cluster-template
            path: rayDashboardRouteTemplate
          configuration:
            ray_image: 'quay.io/erikerlandson/ray-ml-ubi:py-3.8-ray-1.4.0'
            # number of workers currently disabled due to bug in JH launcher
            #max_workers: 5
            memory_request: '1024Mi'
            memory_limit: '1024Mi'
            cpu_request: '1'
            cpu_limit: '1'
          return:
            # Paths are applied to the last item in 'resources' list above
            RAY_CLUSTER: 'metadata.labels[odh-ray-cluster-service]'
            RAY_DASH_HOST: 'spec.host'
