
Guide: Running Distributed Ray & PyTorch on Berkelium
- Science IT Team
- Tutorials,AI/ML
- 01 Aug, 2026
Ray and PyTorch have become cornerstone frameworks for machine learning across Berkeley Lab projects, from particle physics reconstruction to climate modeling.
Prerequisites
Before starting, ensure you have:
- An active namespace on Berkelium with GPU quota (see Create Namespace).
- Configured your local
kubectlusing your institutional LBNL credentials. - The KubeRay CLI operator installed in your client environment.
Deploying a RayCluster via CRD
Berkelium supports the KubeRay Operator, allowing you to deploy scalable Ray clusters declaratively:
apiVersion: ray.io/v1kind: RayClustermetadata: name: ray-climate-sim namespace: sci-climate-modelingspec: rayVersion: '2.35.0' headGroupSpec: rayStartParams: dashboard-host: '0.0.0.0' template: spec: containers: - name: ray-head image: rayproject/ray:2.35.0-py310 resources: limits: cpu: "4" memory: "16Gi"Once applied, the head node dashboard can be port-forwarded directly:
kubectl port-forward svc/ray-climate-sim-head-svc 8265:8265 -n sci-climate-modeling