mirror of
https://github.com/vale981/ray
synced 2025-03-06 10:31:39 -05:00

* Add ray-cluster, modify submit * Add comments * Job submission working * Write docs * Add link to autoscaling * Fix wget link in job * Use namespace file * match tense * fix tab * Improve job documentation * comments * Fix link * Fix links * comments * add overview paragraph * Update imagePullPolicy * Warning if no cluster running * better check
32 lines
1.1 KiB
YAML
32 lines
1.1 KiB
YAML
# Job to run a Ray program in its own pod. Assumes that a cluster is already
|
|
# running (e.g., from './ray-cluster.yaml').
|
|
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
namespace: ray
|
|
generateName: ray-test-job-
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: ray-head
|
|
image: rayproject/autoscaler
|
|
imagePullPolicy: Always
|
|
command: [ "/bin/bash", "-c", "--" ]
|
|
args:
|
|
- "wget https://raw.githubusercontent.com/ray-project/ray/master/doc/kubernetes/example.py &&
|
|
ray start --node-ip-address=$MY_POD_IP --num-cpus=0 --redis-address=$RAY_HEAD_SERVICE_HOST:$RAY_HEAD_SERVICE_PORT_REDIS_PRIMARY --object-manager-port=12345 --node-manager-port=12346 &&
|
|
python example.py"
|
|
ports:
|
|
- containerPort: 12345 # Ray internal communication.
|
|
- containerPort: 12346 # Ray internal communication.
|
|
env:
|
|
- name: MY_POD_IP
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: status.podIP
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 512Mi
|