Hugging Face TRL on PyTorch CUDA for Swale GPU tasks. Backs the trl-* tasks.
345
Swale-built image backing the TRL task definitions: trl-sft, trl-dpo,
trl-reward, trl-kto, trl-grpo, trl-rloo and trl-distillation. It
layers Hugging Face TRL and the training
stack it drives on top of the official PyTorch CUDA runtime, so a workflow can
run any of TRL's trainers from a config file without a build step.
pytorch/pytorch, CUDA
13.0, cuDNN 9)requirements.txtswale (uid 1000)WORKDIR /mnt/workspace, no ENTRYPOINTThe image declares no entrypoint (the PyTorch base leaves it unset), so a
task definition's exec.args are the full command line, such as
["trl", "dpo", "--config", "${{inputs.config}}"].
Hugging Face authentication is not the image's job: a definition that needs it
maps its token input to HF_TOKEN via its own exec.env (an omitted token
resolves to an empty HF_TOKEN, which the Hugging Face stack treats as no
token).
This is a CUDA image. Tasks that reference it require a GPU compute type; on a CPU type it fails at runtime with CUDA errors.
Each tag is the version of TRL the image packages, such as 0.24.0. A
rebuild that keeps that version, to pick up a fixed base image or wrapper,
adds -r1, -r2, and so on. A tag is never reused; latest follows the
newest publish.
From the repository root:
docker build -t swaleio/trl:dev images/trl
Merging a change under images/trl publishes the image under its next tag;
task definitions reference it by digest.
Built from images/trl in the
swaleio/task-definitions repository. For how a task definition
references an image, see the
task definition reference
in the Swale documentation.
The Dockerfile is covered by the MIT License. TRL is Apache-2.0-licensed.
This image also contains software from other projects, each under its own
license. The license texts those projects ship are inside the image:
/usr/share/doc/<package>/copyright for Ubuntu packages and the *.dist-info
directory of each Python package. /usr/share/licenses adds those of the ANTLR
runtime and python-etcd, whose packages ship none, and Intel's for the Math
Kernel Library built into PyTorch. Source code for its GPL and
LGPL components:
https://launchpad.net/ubuntu/+source/<source-package>/<version>https://pypi.org/project/<name>/<version>/#files. The
compiler runtime libraries inside some wheels (libgfortran, libgomp,
libquadmath) are part of GCC.We also provide that source code on request: see Third-party software.
It also contains NVIDIA and Intel software, which is not open source. Each licenses its software under its own terms, which you accept by pulling or using this image: see Third-party software.
docker pull swaleio/trl:latest