HUB
Sign inSign up
axolotl logo

swaleio/axolotl

By swaleio

•Updated 3 days ago

Axolotl fine-tuning for Swale GPU tasks. Backs the axolotl-train and axolotl-merge-lora tasks.

Image
0

179

swaleio/axolotl repository overview

⁠axolotl

Swale-built image backing the axolotl-train and axolotl-merge-lora task definitions. It is built the way Axolotl⁠'s own image is, from Axolotl's base image and the same install step, with two differences: it leaves out apollo-torch, whose license allows only non-commercial use, and it runs as a non-root user.

  • Base: Axolotl's own axolotlai/axolotl-base image (Python 3.12, CUDA 13.0, PyTorch 2.13.0), built on NVIDIA's CUDA image
  • Installed: Axolotl with the extras Axolotl's own image installs (deepspeed, optimizers, ray, fla, ringmaster), and Cut Cross Entropy
  • Left out: apollo-torch, so Axolotl's APOLLO optimizers are not available. The build fails if apollo-torch is ever installed.
  • Changed: /root opened to traversal, because the base installs its Python there and only root can enter it otherwise; nothing else under it is readable that was not already
  • User: non-root swale (uid 1000; replaces the Ubuntu base image's default uid-1000 user)
  • WORKDIR /mnt/workspace, so the relative paths Axolotl writes, such as its prepared-dataset cache, land somewhere writable
  • ENTRYPOINT ["/opt/axolotl/entrypoint.sh"], which puts the CUDA 13 libraries on LD_LIBRARY_PATH, as Axolotl's own image does, and then runs the task's exec.args

⁠Invocation

A task definition's exec.args are the Axolotl command line: ["axolotl", "train", "${{inputs.config}}"] or ["axolotl", "merge-lora", "${{inputs.config}}", "--lora-model-dir", ...].

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; on a CPU type training fails at runtime with CUDA errors.

⁠Tags

Each tag is the version of Axolotl the image packages, such as 0.21.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/axolotl:dev images/axolotl

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


Built from images/axolotl⁠ 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⁠. Axolotl 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 Z3, whose packages ship none, and Intel's for the Math Kernel Library built into PyTorch. 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 software, which is not open source. NVIDIA licenses it under the NVIDIA Deep Learning Container License⁠, a copy of which is at /NGC-DL-CONTAINER-LICENSE, and licenses the NVIDIA Python packages inside under their own agreements. You accept those terms by pulling or using this image: see Third-party software⁠.

It also contains Intel software, which is not open source: Intel's Math Kernel Library, built into PyTorch. Intel licenses it under its own terms, which you accept by pulling or using this image; a copy is at /usr/share/licenses/intel-onemkl/LICENSE.

Tag summary
Recent tags
Content type
Image
Digest
sha256:260ad5718…
Size
8.2 GB
Last updated
3 days ago
docker pull swaleio/axolotl:latest