All Products
Search
Document Center

Lindorm:Run Ray jobs with a custom image

Last Updated:Jun 03, 2026

Build and use a custom image based on Lindorm Ray public images. Pre-package your dependencies to ensure runtime consistency, speed up job startup, and support complex use cases.

Prerequisites

Ensure that you meet the following prerequisites:

Usage notes

Follow these rules to ensure stability and compatibility:

  • In your Dockerfile, do not modify any files in the following directories or their subdirectories:

    • /tmp/ray/

    • /opt/

    • The Ray installation directory. For example, with Python 3.11, the path is /home/ray/anaconda3/lib/python3.11/site-packages/ray/.

  • Push the custom image to an ACR repository in the same region as your Lindorm instance. Lindorm cannot pull images from other regions.

Core workflow

Using a custom image involves four main steps:

  1. Prepare and build: Write a Dockerfile based on an official Lindorm Ray public image and build your custom image.

  2. Push the image: Push the built image to your Alibaba Cloud ACR repository.

  3. Authorize access: Grant Lindorm one-time access to your ACR repository.

  4. Configure and use: When creating a Ray resource group, specify your custom image in the Advanced Configurations section.


Step 1: Prepare and build a custom image

Get the Lindorm Ray public image address

Lindorm provides public images with pre-configured Ray environments. Use them as the base for your custom image.

  • Image pull address format:

    docker pull lindorm-compute-public-registry.cn-hangzhou.cr.aliyuncs.com/lindorm-ray/ray:[image-tag]
  • Available tags:

    Image tag

    Python version

    GPU support

    2.50.1-1.1.1-py310-cpu

    Python 3.10

    No

    2.50.1-1.1.1-py311-cpu

    Python 3.11

    No

    2.50.1-1.1.1-py310-gpu

    Python 3.10

    Yes (CUDA pre-installed)

    2.50.1-1.1.1-py311-gpu

    Python 3.11

    Yes (CUDA pre-installed)

Dependency version guidance

Select compatible dependency versions from the official Ray dependency list. Use pip install -c requirements_compiled.txt to apply version constraints.

Write a Dockerfile

Create a Dockerfile that extends a Lindorm Ray public image with your dependencies.

Example Dockerfile:

FROM lindorm-compute-public-registry.cn-hangzhou.cr.aliyuncs.com/lindorm-ray/ray:2.50.1-1.1.1-py311-cpu

RUN pip install --no-cache-dir numpy pandas
Important

Do not modify files in the /tmp/ray/, /opt/, or Ray installation directories, or their subdirectories. For example, in a Lindorm Ray image with Python 3.11, the Ray installation directory is /home/ray/anaconda3/lib/python3.11/site-packages/ray/.

Build the image

Run the following command in the directory containing the Dockerfile to build the image.

docker build -t your-image-name:tag .

Step 2: Push the image to ACR

Push the built image to your ACR repository.

Log in to ACR

docker login --username=<your-username> <your-registry>

Tag and push the image

docker tag your-image-name:tag <your-registry>/<namespace>/<repo>:tag
docker push <your-registry>/<namespace>/<repo>:tag

Step 3: Authorize Lindorm to access ACR

On the Ray resource group creation page, authorize Lindorm to access your ACR repository.

  1. Click "Password-free Access to ACR Custom Images".

  2. In the dialog box, confirm the authorization.

Note

This authorization is one-time. Subsequent resource groups reuse it.


Step 4: Use the custom image

When creating a Ray resource group, add the following JSON in the Advanced Configurations section to specify your custom image.

{ 
"clusterConfig.image.custom.acr.instanceId":"your-acr-instanceId",
"clusterConfig.image":"your-full-image-addr"
}

Configuration parameters:

Parameter

Description

Example

clusterConfig.image.custom.acr.instanceId

Your ACR instance ID.

"cri-123456789"

clusterConfig.image

The full image address, in the format <registry>/<namespace>/<repo>:<tag>.

"your-registry-vpc.cn-hangzhou.cr.aliyuncs.com/my-namespace/my-ray-app:1.0"

You can now create a Ray resource group with your custom image.