Guide: Running Distributed Ray & PyTorch on Berkelium

Guide: Running Distributed Ray & PyTorch on Berkelium

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:

  1. An active namespace on Berkelium with GPU quota (see Create Namespace).
  2. Configured your local kubectl using your institutional LBNL credentials.
  3. 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/v1
kind: RayCluster
metadata:
name: ray-climate-sim
namespace: sci-climate-modeling
spec:
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:

Terminal window
kubectl port-forward svc/ray-climate-sim-head-svc 8265:8265 -n sci-climate-modeling

Related Posts