Skip to content

Commit 91656de

Browse files
Finish
1 parent 1618a15 commit 91656de

File tree

7 files changed

+642
-2
lines changed

7 files changed

+642
-2
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM linuxserver/code-server:4.101.2
2+
3+
RUN sudo apt-get update && apt-get install -y software-properties-common && sudo add-apt-repository ppa:deadsnakes/ppa && apt-get install -y python3 python3-pip && pip3 install ray[default] debugpy --break-system-packages
4+
5+
RUN mkdir -p /config/extensions \
6+
&& curl -L -o /config/extensions/ms-python.python.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2025.10.0/vspackage \
7+
&& curl -L -o /config/extensions/ms-python.debugpy.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/debugpy/2025.10.0/vspackage \
8+
&& curl -L -o /config/extensions/anyscalecompute.ray-distributed-debugger.vsix https://marketplace.visualstudio.com/_apis/public/gallery/publishers/anyscalecompute/vsextensions/ray-distributed-debugger/0.1.4/vspackage \
9+
&& /app/code-server/bin/code-server --extensions-dir /config/extensions --install-extension ms-python.python \
10+
&& /app/code-server/bin/code-server --extensions-dir /config/extensions --install-extension ms-python.debugpy \
11+
&& /app/code-server/bin/code-server --extensions-dir /config/extensions --install-extension anyscalecompute.ray-distributed-debugger

README.en.md

Lines changed: 270 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 270 additions & 2 deletions
Large diffs are not rendered by default.

example/dependency/__init__.py

Whitespace-only changes.

example/dependency/dependency.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import ray
2+
3+
@ray.remote
4+
def f(x):
5+
print(x)
6+
breakpoint()
7+
return x * x
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apiVersion: ray.io/v1
2+
kind: RayJob
3+
metadata:
4+
name: rayjob-interactive-mode
5+
spec:
6+
# InteractiveMode means KubeRay doesn't submit the job for you.
7+
# KubeRay will create the RayJob and transition it to the Waiting state.
8+
# The user needs to submit the job manually via the `ray job submit` command
9+
# and then update the `spec.jobId` field with the job ID.
10+
# After that, KubeRay will handle the rest of the lifecycle for the RayJob.
11+
submissionMode: InteractiveMode
12+
# User needs to update this field with the job ID after submitting the job
13+
jobId: ""
14+
rayClusterSpec:
15+
headGroupSpec:
16+
rayStartParams: {}
17+
template:
18+
spec:
19+
containers:
20+
- image: rayproject/ray:2.46.0
21+
name: ray-head
22+
ports:
23+
- containerPort: 6379
24+
name: gcs-server
25+
- containerPort: 8265
26+
name: dashboard
27+
- containerPort: 10001
28+
name: client
29+
resources:
30+
limits:
31+
cpu: "500m"
32+
requests:
33+
cpu: "200m"
34+
volumeMounts:
35+
- mountPath: /tmp/ray
36+
name: shared-ray-volume
37+
- name: vscode-debugger
38+
image: docker.io/onesizefitsquorum/code-server-with-ray-distributed-debugger:4.101.2
39+
imagePullPolicy: IfNotPresent
40+
ports:
41+
- containerPort: 8443
42+
volumeMounts:
43+
- mountPath: /tmp/ray
44+
name: shared-ray-volume
45+
env:
46+
- name: PUID
47+
value: "1000"
48+
- name: PGID
49+
value: "1000"
50+
- name: TZ
51+
value: "Asia/Shanghai"
52+
- name: DEFAULT_WORKSPACE
53+
value: "/tmp/ray/session_latest/runtime_resources"
54+
- name: SUDO_PASSWORD
55+
value: "root"
56+
volumes:
57+
- name: shared-ray-volume # Shared volume for /tmp/ray
58+
emptyDir: {}
59+
workerGroupSpecs:
60+
- groupName: default-group
61+
replicas: 1
62+
minReplicas: 1
63+
maxReplicas: 1
64+
rayStartParams: {}
65+
template:
66+
spec:
67+
containers:
68+
- image: rayproject/ray:2.46.0
69+
name: ray-worker
70+
resources:
71+
limits:
72+
cpu: "500m"
73+
requests:
74+
cpu: "200m"

example/working_dir/sample_code.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import ray
2+
3+
ray.init()
4+
5+
from dependency.dependency import f
6+
7+
futures = [f.remote(i) for i in range(4)]
8+
9+
breakpoint()
10+
print(ray.get(futures)) # [0, 1, 4, 9]

0 commit comments

Comments
 (0)