Skip to content

Commit

Permalink
update ray image to use quay mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelClifford authored and anishasthana committed Jul 10, 2023
1 parent 2820415 commit baec858
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion demo-notebooks/batch-job/batch_mnist_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
" min_memory=16,\n",
" max_memory=16,\n",
" gpu=4,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=True, # Can be set to false if scaling not needed\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"] # Can be removed if above is false\n",
"))"
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/guided-demos/0_basic_ray.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
" max_cpus=1,\n",
" min_memory=4,\n",
" max_memory=4,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" gpu=0,\n",
" instascale=False\n",
"))"
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/guided-demos/1_basic_instascale.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" gpu=1,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=True, # InstaScale now enabled, will scale OCP cluster to guarantee resource request\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"] # Head, worker AWS machine types desired\n",
"))"
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/guided-demos/2_basic_jobs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
" min_memory=4,\n",
" max_memory=4,\n",
" gpu=0,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=False\n",
"))"
]
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/guided-demos/3_basic_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" gpu=1,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=True,\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"]\n",
" \n",
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/guided-demos/4_gpt.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
" min_memory=8,\n",
" max_memory=8,\n",
" gpu=1,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=True,\n",
" machine_types=[\"m5.xlarge\", \"g4dn.xlarge\"],\n",
"))"
Expand Down
2 changes: 1 addition & 1 deletion demo-notebooks/interactive/hf_interactive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
" min_memory=16, \n",
" max_memory=16, \n",
" gpu=4,\n",
" image=\"rayproject/ray:2.5.0-py38-cu116\",\n",
" image=\"quay.io/project-codeflare/ray:2.5.0-py38-cu116\",\n",
" instascale=True, machine_types=[\"m5.xlarge\", \"p3.8xlarge\"]))"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/codeflare_sdk/cluster/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ class ClusterConfiguration:
template: str = f"{dir}/templates/base-template.yaml"
instascale: bool = False
envs: dict = field(default_factory=dict)
image: str = "rayproject/ray:2.5.0-py38-cu116"
image: str = "quay.io/project-codeflare/ray:2.5.0-py38-cu116"
local_interactive: bool = False
image_pull_secrets: list = field(default_factory=list)
4 changes: 2 additions & 2 deletions tests/test-case-bad.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: rayproject/ray:2.5.0-py38-cu116
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -130,7 +130,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: status.podIP
image: rayproject/ray:2.5.0-py38-cu116\
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
lifecycle:
preStop:
exec:
Expand Down
4 changes: 2 additions & 2 deletions tests/test-case.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ spec:
value: /home/ray/workspace/tls/server.key
- name: RAY_TLS_CA_CERT
value: /home/ray/workspace/tls/ca.crt
image: rayproject/ray:2.5.0-py38-cu116
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
imagePullPolicy: Always
lifecycle:
preStop:
Expand Down Expand Up @@ -148,7 +148,7 @@ spec:
value: /home/ray/workspace/tls/server.key
- name: RAY_TLS_CA_CERT
value: /home/ray/workspace/tls/ca.crt
image: rayproject/ray:2.5.0-py38-cu116
image: quay.io/project-codeflare/ray:2.5.0-py38-cu116
lifecycle:
preStop:
exec:
Expand Down
18 changes: 9 additions & 9 deletions tests/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_config_creation():
assert config.min_cpus == 3 and config.max_cpus == 4
assert config.min_memory == 5 and config.max_memory == 6
assert config.gpu == 7
assert config.image == "rayproject/ray:2.5.0-py38-cu116"
assert config.image == "quay.io/project-codeflare/ray:2.5.0-py38-cu116"
assert config.template == f"{parent}/src/codeflare_sdk/templates/base-template.yaml"
assert config.instascale
assert config.machine_types == ["cpu.small", "gpu.large"]
Expand Down Expand Up @@ -665,7 +665,7 @@ def get_ray_obj(cls=None):
"spec": {
"containers": [
{
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"imagePullPolicy": "Always",
"lifecycle": {
"preStop": {
Expand Down Expand Up @@ -735,7 +735,7 @@ def get_ray_obj(cls=None):
},
}
],
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"lifecycle": {
"preStop": {
"exec": {
Expand Down Expand Up @@ -799,7 +799,7 @@ def get_aw_obj():
"kind": "AppWrapper",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": '{"apiVersion":"mcad.ibm.com/v1beta1","kind":"AppWrapper","metadata":{"annotations":{},"name":"quicktest1","namespace":"ns"},"spec":{"priority":9,"resources":{"GenericItems":[{"custompodresources":[{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}},{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}],"generictemplate":{"apiVersion":"ray.io/v1alpha1","kind":"RayCluster","metadata":{"labels":{"appwrapper.mcad.ibm.com":"quicktest1","controller-tools.k8s.io":"1.0"},"name":"quicktest1","namespace":"ns"},"spec":{"autoscalerOptions":{"idleTimeoutSeconds":60,"imagePullPolicy":"Always","resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"500m","memory":"512Mi"}},"upscalingMode":"Default"},"enableInTreeAutoscaling":false,"headGroupSpec":{"rayStartParams":{"block":"true","dashboard-host":"0.0.0.0","num-gpus":"0"},"serviceType":"ClusterIP","template":{"spec":{"containers":[{"image":"rayproject/ray:2.5.0-py38-cu116","imagePullPolicy":"Always","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"ray-head","ports":[{"containerPort":6379,"name":"gcs"},{"containerPort":8265,"name":"dashboard"},{"containerPort":10001,"name":"client"}],"resources":{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}}}]}}},"rayVersion":"1.12.0","workerGroupSpecs":[{"groupName":"small-group-quicktest","maxReplicas":1,"minReplicas":1,"rayStartParams":{"block":"true","num-gpus":"0"},"replicas":1,"template":{"metadata":{"annotations":{"key":"value"},"labels":{"key":"value"}},"spec":{"containers":[{"env":[{"name":"MY_POD_IP","valueFrom":{"fieldRef":{"fieldPath":"status.podIP"}}}],"image":"rayproject/ray:2.5.0-py38-cu116","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"machine-learning","resources":{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}}],"initContainers":[{"command":["sh","-c","until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"],"image":"busybox:1.28","name":"init-myservice"}]}}}]}},"replicas":1},{"generictemplate":{"apiVersion":"route.openshift.io/v1","kind":"Route","metadata":{"labels":{"odh-ray-cluster-service":"quicktest-head-svc"},"name":"ray-dashboard-quicktest","namespace":"default"},"spec":{"port":{"targetPort":"dashboard"},"to":{"kind":"Service","name":"quicktest-head-svc"}}},"replica":1}],"Items":[]}}}\n'
"kubectl.kubernetes.io/last-applied-configuration": '{"apiVersion":"mcad.ibm.com/v1beta1","kind":"AppWrapper","metadata":{"annotations":{},"name":"quicktest1","namespace":"ns"},"spec":{"priority":9,"resources":{"GenericItems":[{"custompodresources":[{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}},{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}],"generictemplate":{"apiVersion":"ray.io/v1alpha1","kind":"RayCluster","metadata":{"labels":{"appwrapper.mcad.ibm.com":"quicktest1","controller-tools.k8s.io":"1.0"},"name":"quicktest1","namespace":"ns"},"spec":{"autoscalerOptions":{"idleTimeoutSeconds":60,"imagePullPolicy":"Always","resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"500m","memory":"512Mi"}},"upscalingMode":"Default"},"enableInTreeAutoscaling":false,"headGroupSpec":{"rayStartParams":{"block":"true","dashboard-host":"0.0.0.0","num-gpus":"0"},"serviceType":"ClusterIP","template":{"spec":{"containers":[{"image":"quay.io/project-codeflare/ray:2.5.0-py38-cu116","imagePullPolicy":"Always","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"ray-head","ports":[{"containerPort":6379,"name":"gcs"},{"containerPort":8265,"name":"dashboard"},{"containerPort":10001,"name":"client"}],"resources":{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}}}]}}},"rayVersion":"1.12.0","workerGroupSpecs":[{"groupName":"small-group-quicktest","maxReplicas":1,"minReplicas":1,"rayStartParams":{"block":"true","num-gpus":"0"},"replicas":1,"template":{"metadata":{"annotations":{"key":"value"},"labels":{"key":"value"}},"spec":{"containers":[{"env":[{"name":"MY_POD_IP","valueFrom":{"fieldRef":{"fieldPath":"status.podIP"}}}],"image":"quay.io/project-codeflare/ray:2.5.0-py38-cu116","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"machine-learning","resources":{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}}],"initContainers":[{"command":["sh","-c","until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"],"image":"busybox:1.28","name":"init-myservice"}]}}}]}},"replicas":1},{"generictemplate":{"apiVersion":"route.openshift.io/v1","kind":"Route","metadata":{"labels":{"odh-ray-cluster-service":"quicktest-head-svc"},"name":"ray-dashboard-quicktest","namespace":"default"},"spec":{"port":{"targetPort":"dashboard"},"to":{"kind":"Service","name":"quicktest-head-svc"}}},"replica":1}],"Items":[]}}}\n'
},
"creationTimestamp": "2023-02-22T16:26:07Z",
"generation": 4,
Expand Down Expand Up @@ -928,7 +928,7 @@ def get_aw_obj():
"spec": {
"containers": [
{
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"imagePullPolicy": "Always",
"lifecycle": {
"preStop": {
Expand Down Expand Up @@ -1002,7 +1002,7 @@ def get_aw_obj():
},
}
],
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"lifecycle": {
"preStop": {
"exec": {
Expand Down Expand Up @@ -1121,7 +1121,7 @@ def get_aw_obj():
"kind": "AppWrapper",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": '{"apiVersion":"mcad.ibm.com/v1beta1","kind":"AppWrapper","metadata":{"annotations":{},"name":"quicktest2","namespace":"ns"},"spec":{"priority":9,"resources":{"GenericItems":[{"custompodresources":[{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}},{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}],"generictemplate":{"apiVersion":"ray.io/v1alpha1","kind":"RayCluster","metadata":{"labels":{"appwrapper.mcad.ibm.com":"quicktest2","controller-tools.k8s.io":"1.0"},"name":"quicktest2","namespace":"ns"},"spec":{"autoscalerOptions":{"idleTimeoutSeconds":60,"imagePullPolicy":"Always","resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"500m","memory":"512Mi"}},"upscalingMode":"Default"},"enableInTreeAutoscaling":false,"headGroupSpec":{"rayStartParams":{"block":"true","dashboard-host":"0.0.0.0","num-gpus":"0"},"serviceType":"ClusterIP","template":{"spec":{"containers":[{"image":"rayproject/ray:2.5.0-py38-cu116","imagePullPolicy":"Always","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"ray-head","ports":[{"containerPort":6379,"name":"gcs"},{"containerPort":8265,"name":"dashboard"},{"containerPort":10001,"name":"client"}],"resources":{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}}}]}}},"rayVersion":"1.12.0","workerGroupSpecs":[{"groupName":"small-group-quicktest","maxReplicas":1,"minReplicas":1,"rayStartParams":{"block":"true","num-gpus":"0"},"replicas":1,"template":{"metadata":{"annotations":{"key":"value"},"labels":{"key":"value"}},"spec":{"containers":[{"env":[{"name":"MY_POD_IP","valueFrom":{"fieldRef":{"fieldPath":"status.podIP"}}}],"image":"rayproject/ray:2.5.0-py38-cu116","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"machine-learning","resources":{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}}],"initContainers":[{"command":["sh","-c","until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"],"image":"busybox:1.28","name":"init-myservice"}]}}}]}},"replicas":1},{"generictemplate":{"apiVersion":"route.openshift.io/v1","kind":"Route","metadata":{"labels":{"odh-ray-cluster-service":"quicktest-head-svc"},"name":"ray-dashboard-quicktest","namespace":"default"},"spec":{"port":{"targetPort":"dashboard"},"to":{"kind":"Service","name":"quicktest-head-svc"}}},"replica":1}],"Items":[]}}}\n'
"kubectl.kubernetes.io/last-applied-configuration": '{"apiVersion":"mcad.ibm.com/v1beta1","kind":"AppWrapper","metadata":{"annotations":{},"name":"quicktest2","namespace":"ns"},"spec":{"priority":9,"resources":{"GenericItems":[{"custompodresources":[{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}},{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"replicas":1,"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}],"generictemplate":{"apiVersion":"ray.io/v1alpha1","kind":"RayCluster","metadata":{"labels":{"appwrapper.mcad.ibm.com":"quicktest2","controller-tools.k8s.io":"1.0"},"name":"quicktest2","namespace":"ns"},"spec":{"autoscalerOptions":{"idleTimeoutSeconds":60,"imagePullPolicy":"Always","resources":{"limits":{"cpu":"500m","memory":"512Mi"},"requests":{"cpu":"500m","memory":"512Mi"}},"upscalingMode":"Default"},"enableInTreeAutoscaling":false,"headGroupSpec":{"rayStartParams":{"block":"true","dashboard-host":"0.0.0.0","num-gpus":"0"},"serviceType":"ClusterIP","template":{"spec":{"containers":[{"image":"quay.io/project-codeflare/ray:2.5.0-py38-cu116","imagePullPolicy":"Always","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"ray-head","ports":[{"containerPort":6379,"name":"gcs"},{"containerPort":8265,"name":"dashboard"},{"containerPort":10001,"name":"client"}],"resources":{"limits":{"cpu":2,"memory":"8G","nvidia.com/gpu":0},"requests":{"cpu":2,"memory":"8G","nvidia.com/gpu":0}}}]}}},"rayVersion":"1.12.0","workerGroupSpecs":[{"groupName":"small-group-quicktest","maxReplicas":1,"minReplicas":1,"rayStartParams":{"block":"true","num-gpus":"0"},"replicas":1,"template":{"metadata":{"annotations":{"key":"value"},"labels":{"key":"value"}},"spec":{"containers":[{"env":[{"name":"MY_POD_IP","valueFrom":{"fieldRef":{"fieldPath":"status.podIP"}}}],"image":"quay.io/project-codeflare/ray:2.5.0-py38-cu116","lifecycle":{"preStop":{"exec":{"command":["/bin/sh","-c","ray stop"]}}},"name":"machine-learning","resources":{"limits":{"cpu":1,"memory":"2G","nvidia.com/gpu":0},"requests":{"cpu":1,"memory":"2G","nvidia.com/gpu":0}}}],"initContainers":[{"command":["sh","-c","until nslookup $RAY_IP.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done"],"image":"busybox:1.28","name":"init-myservice"}]}}}]}},"replicas":1},{"generictemplate":{"apiVersion":"route.openshift.io/v1","kind":"Route","metadata":{"labels":{"odh-ray-cluster-service":"quicktest-head-svc"},"name":"ray-dashboard-quicktest","namespace":"default"},"spec":{"port":{"targetPort":"dashboard"},"to":{"kind":"Service","name":"quicktest-head-svc"}}},"replica":1}],"Items":[]}}}\n'
},
"creationTimestamp": "2023-02-22T16:26:07Z",
"generation": 4,
Expand Down Expand Up @@ -1250,7 +1250,7 @@ def get_aw_obj():
"spec": {
"containers": [
{
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"imagePullPolicy": "Always",
"lifecycle": {
"preStop": {
Expand Down Expand Up @@ -1324,7 +1324,7 @@ def get_aw_obj():
},
}
],
"image": "rayproject/ray:2.5.0-py38-cu116",
"image": "quay.io/project-codeflare/ray:2.5.0-py38-cu116",
"lifecycle": {
"preStop": {
"exec": {
Expand Down

0 comments on commit baec858

Please sign in to comment.