Skip to content

Instantly share code, notes, and snippets.

@bakfoo
Last active January 1, 2022 05:19
Show Gist options
  • Save bakfoo/6cef94cc320d6adc183e4e92cd891971 to your computer and use it in GitHub Desktop.
Save bakfoo/6cef94cc320d6adc183e4e92cd891971 to your computer and use it in GitHub Desktop.
# Job to submit a Ray program from a pod outside a running Ray cluster.
apiVersion: batch/v1
kind: Job
metadata:
name: ray-test-job
spec:
template:
spec:
restartPolicy: Never
containers:
- name: ray
image: rayproject/ray:latest
imagePullPolicy: Always
command: [ "/bin/bash", "-c", "--" ]
args:
- "wget https://gist.githubusercontent.com/bakfoo/faa0efdc9b2730c5f65ce2ee29fa80c5/raw/a98eafad3648a7f3d2a0fb0675e54b8ae3bd1385/rayjob.py &&
python rayjob.py"
resources:
requests:
cpu: 100m
memory: 512Mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment