Skip to main content

Run ray on tracto.ai

Project description

Tractoray

The tool for running Ray clusters on Tracto.ai. Allows you to easily deploy and manage Ray clusters within Tracto.ai infrastructure.

Features

  • Launch Ray clusters with configurable resources.
  • Support native ray dashboard and ray client.
  • Support Ray Debugger.
  • Flexible Docker image configuration.

To see all the configuration options for Ray, please check the output of the tractoratay start --help command.

Installation

Install tractoray with Ray CLI and all required dependencies:

pip install -U "tractoray[ray]"

Usage

Basic Commands

To use tractoray, you need to specify the working directory, for example your homedir //home/<login>/tractoray.

Start a cluster:

tractoray start --workdir //your/cypress/path --node-count 2

An output of the command contains an instruction to connect to the cluster.

Check the cluster status:

tractoray status --workdir //your/yt/path

Also JSON format is supported:

tractoray status --workdir //your/cypress/path --format json

Stop the cluster:

tractoray stop --workdir //your/cypress/path

For detailed information about task submission, log reading, and other operations, please check the ray status command output.

Using Custom Docker Images

You have two options for Docker images:

  1. Use the default image as base (recommended):

    FROM cr.eu-north1.nebius.cloud/e00faee7vas5hpsh3s/tractoray/default:2025-06-12-16-59-42-9a2ce5611
    
    # Add your dependencies
    RUN pip install your-package
    
  2. Build from scratch:

    • Install tractoray via pip
    • Make sure to use the same version as in your local environment and install all necessary dependencies for CUDA and infiniband.
    FROM python:3.12
    
    RUN pip install tractoray==<your-local-version>
    # Add other dependencies
    

The default image includes all necessary dependencies and configurations for Ray cluster operation for machine learning tasks. Using it as a base image is recommended to ensure compatibility.

Connect to the Ray Head Node terminal

It's possible to connect to the Ray head node terminal using yt run-job-shell command or using web terminal in the UI. You can find the instructions and commands for connecting in the output of tractoratay status command.

Ray Debugging

Currently, only the legacy Ray debugger is supported.

How to use it on Tracto.ai:

  1. Start your Ray cluster with RAY_DEBUG=legacy environment variable and --ray-debugger-external option: tractoray start --workdir //your/cypress/path --ray-head-params="--ray-debugger-external" --ray-worker-params="--ray-debugger-external" --env-var "RAY_DEBUG=legacy"
  2. Connect to the Ray head node terminal using yt run-job-shell or web UI (instructions and necessary links can be found in the output of ray start and ray status).
  3. Run ray debug in the terminal on the head node to start the Ray Debugger.

You can read more about debugging Ray tasks in the official Ray documentation.

Environment Variables

  • YT_LOG_LEVEL: Set logging level

Limitations

  • Some Ray CLI options, such as ray status, may not function properly due to Ray authentication constraints. It is recommended to use Ray dashboard and Ray SDK instead or run Ray CLI on the head node.
  • Ray Serve is not supported.
  • Observability features are disabled by default. You can enable and configure them in your custom image.
  • Only legacy Ray Debugger is supported.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tractoray-0.0.10.tar.gz (91.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tractoray-0.0.10-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file tractoray-0.0.10.tar.gz.

File metadata

  • Download URL: tractoray-0.0.10.tar.gz
  • Upload date:
  • Size: 91.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tractoray-0.0.10.tar.gz
Algorithm Hash digest
SHA256 fd22e098702dc78b996324073c84d059b8d2dd4b8b07f3d0e73ff1bae60693be
MD5 997540b1853b2ac806d44d08d323f471
BLAKE2b-256 ea8ac64d68021e5ee67aaac5871a2cd88d787d7ea8c7f9ad2d4994eee3389ea4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tractoray-0.0.10.tar.gz:

Publisher: tractoray-pypi.yaml on tractoai/farm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tractoray-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: tractoray-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tractoray-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 90cf34aa6a08f27307be0e5b240af340ecb86ddf1511856ebab088eac90eb7ba
MD5 6e19d1d4f879426f3310e07ded1a118d
BLAKE2b-256 436a0da1a1edf4dd641240f358e58bd6dd36561114d274f3d3c02739ea5ec3f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tractoray-0.0.10-py3-none-any.whl:

Publisher: tractoray-pypi.yaml on tractoai/farm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page