docker.qmd 3.3 KB
Newer Older
chenzk's avatar
v1.0  
chenzk committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
title: "Docker"
format:
  html:
    toc: true
    toc-depth: 4
---

This section describes the different Docker images that are released by AxolotlAI at [Docker Hub](https://hub.docker.com/u/axolotlai).

::: {.callout-important}
For Blackwell GPUs, please use the tags with Pytorch 2.7.0 and CUDA 12.8.
:::

## Base

The base image is the most minimal image that can install Axolotl. It is based on the `nvidia/cuda` image. It includes python, torch, git, git-lfs, awscli, pydantic, and more.

#### Image

```
axolotlai/axolotl-base
```

Link: [Docker Hub](https://hub.docker.com/r/axolotlai/axolotl-base)

#### Tags format

```bash
main-base-py{python_version}-cu{cuda_version}-{pytorch_version}
```

Tags examples:

- `main-base-py3.11-cu128-2.7.0`
- `main-base-py3.11-cu126-2.7.0`
- `main-base-py3.11-cu124-2.6.0`
- `main-base-py3.11-cu124-2.5.1`
- `main-base-py3.11-cu124-2.4.1`

## Main

The main image is the image that is used to run Axolotl. It is based on the `axolotlai/axolotl-base` image and includes the Axolotl codebase, dependencies, and more.

#### Image

```
axolotlai/axolotl
```

Link: [Docker Hub](https://hub.docker.com/r/axolotlai/axolotl)

#### Tags format {#sec-main-tags}

```bash
# on push to main
main-py{python_version}-cu{cuda_version}-{pytorch_version}

# latest main (currently torch 2.6.0, python 3.11, cuda 12.4)
main-latest

# nightly build
{branch}-{date_in_YYYYMMDD}-py{python_version}-cu{cuda_version}-{pytorch_version}

# tagged release
{version}
```

:::{.callout-tip}

There may be some extra tags appended to the image, like `-vllm` which installs those packages.

:::

Tags examples:

- `main-py3.11-cu126-2.7.0`
- `main-py3.11-cu124-2.6.0`
- `main-py3.11-cu124-2.5.1`
- `main-py3.11-cu124-2.4.1`
- `main-latest`
- `main-20250303-py3.11-cu124-2.6.0`
- `main-20250303-py3.11-cu124-2.5.1`
- `main-20250303-py3.11-cu124-2.4.1`
- `0.7.1`

## Cloud

The cloud image is the image that is used to run Axolotl in the cloud. It is based on the `axolotlai/axolotl` image and sets ENV variables like HuggingFace cache directories for volume mounts, tmux, and more for different cloud providers.

:::{.callout-tip}

Jupyter lab is run by default. Set `JUPYTER_DISABLE=1` in the environment variables to disable it.

:::

#### Image

```
axolotlai/axolotl-cloud
```

Link: [Docker Hub](https://hub.docker.com/r/axolotlai/axolotl-cloud)

#### Tags format

This uses the same tags as the [`main` image](#sec-main-tags).

#### Environment variables

- `JUPYTER_DISABLE`: Disable Jupyter lab.
- `JUPYTER_PASSWORD`: Set a password for the Jupyter lab.
- `PUBLIC_KEY` / `SSH_KEY`: Add a public key for the SSH service.

#### Volume mounts

:::{.callout-tip}

We recommend mounting volumes to `/workspace/data` for data persistence. `/workspace/axolotl` contains the source code and is ephemeral.

:::

- `/workspace/data/axolotl-artifacts`: Directory to store Axolotl artifacts.
- `/workspace/data/huggingface-cache`: Directory to store HuggingFace cache.

## Cloud-no-tmux

This is the same as the [`cloud` image](#sec-cloud) but without tmux.

#### Image

```
axolotlai/axolotl-cloud-term
```

Link: [Docker Hub](https://hub.docker.com/r/axolotlai/axolotl-cloud-term)

:::{.callout-note}

The naming may be a bit confusing as it has `-term` appended to the end.

:::

#### Tags format

This uses the same tags as the [`cloud` image](#sec-cloud-tags).