HUB
Sign inSign up
transformers-gpu logo

swaleio/transformers-gpu

By swaleio

•Updated 4 days ago

PyTorch CUDA with the Hugging Face training stack for Swale GPU tasks.

Image
0

760

swaleio/transformers-gpu repository overview

⁠transformers-gpu

Swale-built image backing the transformers task definition. It layers the Hugging Face training stack on top of the official PyTorch CUDA runtime, so a workflow can run inference, supervised fine-tuning, or arbitrary GPU Python without a build step.

  • Base: the official PyTorch CUDA runtime image (pytorch/pytorch, CUDA 13.0, cuDNN 9)
  • Installed: Transformers, Accelerate, Datasets, TRL, PEFT, SentencePiece and the Hugging Face Hub client, at the versions pinned in requirements.txt⁠
  • User: non-root swale (uid 1000)
  • Hub cache — defaults to the Hugging Face location under the home directory, which the platform mounts writable and per-task, so it is discarded with the task. A script that wants the weights reused by later tasks in the run sets HF_HOME (or from_pretrained(cache_dir=...)) to a workspace path itself — this image is driven by a free-form script, so nothing here forces the default.
  • WORKDIR /mnt/workspace, no ENTRYPOINT

⁠Invocation

The image declares no entrypoint (the PyTorch base leaves it unset), so a task definition's exec.args are the full command line, here a free-form script (["bash", "-lc", "… exec python /tmp/run.py"]). bash, trl, and python are all on PATH.

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).

⁠GPU

This is a CUDA image. Tasks that reference it require a GPU compute type — the workflow selects the compute type, and scheduling on a CPU type fails at runtime with CUDA errors (gpu-smoke-test exists to surface exactly that, fast).

⁠Tags

Each tag is the version of Transformers the image packages, such as 4.57.1. 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.

⁠Building

From the repository root:

docker build -t swaleio/transformers-gpu:dev images/transformers-gpu

Merging a change under images/transformers-gpu publishes the image under its next tag; task definitions reference it by digest.


Built from images/transformers-gpu⁠ 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 and entrypoint are covered by the MIT License⁠. Transformers 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. Source code for its GPL and LGPL components:

  • Ubuntu packages: https://launchpad.net/ubuntu/+source/<source-package>/<version>
  • Python packages: 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⁠.

Tag summary
Recent tags
Content type
Image
Digest
sha256:ceac9eb35…
Size
3.2 GB
Last updated
4 days ago
docker pull swaleio/transformers-gpu:latest