Train transformer language models with reinforcement learning.
docker pull huggingface/trl:latest
docker run -d --name trl --restart always huggingface/trl:latest
podman run -d --name trl --restart always huggingface/trl:latest
skopeo inspect docker://docker.io/huggingface/trl:latest
oras pull huggingface/trl:latest
FROM nvidia/cuda:13.0.3-devel-ubuntu24.04
COPY --from=ghcr.io/astral-sh/uv:0.12.24 /uv /usr/local/bin/uv
ENV VIRTUAL_ENV=/opt/venv UV_PYTHON_INSTALL_DIR=/opt/uv/python PATH=/opt/venv/bin:$PATH
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
RUN uv venv --python 3.13 --seed $VIRTUAL_ENV
# Without this floor, uv may pick vLLM 0.30.0 (no transformers cap) with the latest transformers (not tested with vLLM 0.30.0): https://github.com/huggingface/trl/issues/7819
RUN uv pip install --no-cache "git+https://github.com/huggingface/trl.git#egg=trl[kernels,liger,peft,vlm,vllm]" "vllm>=0.31.0" trackio