en un clic
rebuild
// Rebuild Ray from source — determines the right build mode based on what changed
// Rebuild Ray from source — determines the right build mode based on what changed
| name | rebuild |
| description | Rebuild Ray from source — determines the right build mode based on what changed |
Canonical build docs: doc/source/ray-contribute/development.rst
Use the user's configured Python from CLAUDE.local.md, or fall back to which python.
Update this skill if any changes are detected in development.rst.
git diff --name-only HEAD (or ask the user)pip install -e . — editable mode auto-picks up Python changes)Running Python tests that exercise C++ changes: When a Python test depends on C++ or Cython code (raylet, GCS, core_worker, etc.), run the C++/Cython rebuild below before running the test. Editable Python installs do not rebuild the compiled extensions, so stale binaries will run otherwise.
For changes to Tune, RLlib, Autoscaler, and most Python files. Two approaches depending on how Ray was installed:
pip install -e . (editable/full source build)No rebuild needed — Python changes are picked up automatically.
python python/ray/setup-dev.pypython python/ray/setup-dev.py -y --skip _private dashboardWarning: With setup-dev.py, don't run pip uninstall ray or pip install -U.
Instead: rm -rf <site-packages>/ray, reinstall wheel, re-run setup-dev.py.
bazel run //:gen_ray_pkg
bazel build //src/ray/raylet:raylet # Raylet only
bazel build //src/ray/gcs:gcs_server # GCS server only
bazel build //src/ray/core_worker:core_worker # Core worker only
bazel build //:ray_pkg # All C++ and Cython
bazel run -c fastbuild //:gen_ray_pkg — fast build (less optimization)bazel run -c dbg //:gen_ray_pkg — debug build with symbols (for gdb)bazel run -c opt //:gen_ray_pkg — optimized buildMake permanent in ~/.bazelrc: build --compilation_mode=fastbuild
cd python/ray/dashboard/client && npm ci && npm run build && cd -cd python/ && pip install -r requirements.txtpip install -e . --verboseAdd to ~/.bazelrc if machine runs out of memory:
build --local_ram_resources=HOST_RAM*.5 --local_cpu_resources=4
build --disk_cache=~/bazel-cache
bazel info execution_rootpip install -e .