Skip to content

README: point AMD users at the ROCm image - #11066

Merged
danielhanchen merged 5 commits into
mainfrom
docs/readme-agents-and-amd
Sep 16, 2026
Merged

danielhanchen merged 5 commits into
mainfrom
docs/readme-agents-and-amd

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

The Docker section documents --gpus all and install_nvidia_toolkit.sh while the feature list says we support AMD, and docker/DOCKERHUB.md said "AMD GPUs are not supported by these images". That was accurate about those images, and is now a dead end since unsloth/unsloth-rocm is published. Both places now link to it, in one line each.

Also percent-encodes the two spaces in the sticker image URL. GitHub encodes them when rendering, so nothing was visibly broken.

Verification

  • Every link in README.md was checked, 100 unique URLs, for status and page title. None are broken; the only non-200s are Reddit and unsloth.ai/download blocking automated requests.
  • tests/studio -k "readme or docker_hub or dockerhub": 3 passed.
  • git diff --check clean.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T07:38:36.583947Z 34b82c9 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7eb2524dd9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
```
Follow startup with `docker logs -f <container>`, where `<container>` is the ID printed by `docker run -d` or a name from `docker ps`. Studio is at `http://localhost:8000` (user `unsloth`), JupyterLab at `http://localhost:8888`. The two mounts keep different things across `docker rm`: the Hugging Face cache holds models you download (mounting your host cache also reuses what you already have), and the `unsloth-studio` volume holds your accounts, chats and trained models; each image brings its own Studio code, and a volume from an older image is migrated on the first start (its old code is kept under `.unsloth-studio-legacy/`). Tags (`unsloth/unsloth:core` for notebooks only), GPU support and options: [Docker Hub](https://hub.docker.com/r/unsloth/unsloth).

On AMD, use [`unsloth/unsloth-rocm`](https://hub.docker.com/r/unsloth/unsloth-rocm) instead: it carries a ROCm build of the training stack, and AMD GPUs are reached through the driver's device nodes rather than a container toolkit.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restrict the ROCm container instructions to native Linux

For AMD users on WSL—the enclosing section explicitly targets “Linux / WSL”—this command cannot work because WSL exposes /dev/dxg, not /dev/kfd; docker/entrypoint-rocm.sh:65-67 confirms that this image cannot reach a GPU there. Qualify this path as native Linux and direct WSL users to the supported AMD installation path so they do not receive an immediate missing-device failure.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct on the fact: WSL exposes /dev/dxg, not /dev/kfd, so the ROCm image cannot reach a GPU there. The multi-line AMD run block this was written against is gone (334e9b0 left a single pointer line), and 3726240 qualifies that line as native Linux for the same reason.

Comment thread README.md Outdated
```bash
docker run --rm -it \
--device /dev/kfd --device /dev/dri \
--group-add video --group-add render \

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use host numeric GIDs in the ROCm command

On native Linux, this copy-paste command supplies group names, but Docker resolves those names inside the image rather than to the host groups that own /dev/kfd and /dev/dri; the repository's docker/run.sh:64-81, docker/Dockerfile.rocm:29-30, and docker/entrypoint-rocm.sh:75-81 therefore all use numeric host GIDs. If render is absent inside the image Docker rejects the launch, and a same-named group with a different GID does not grant the intended device permissions, so use the getent substitutions shown by the entrypoint or make the wrapper the primary command.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct: --group-add resolves names inside the container, where the host video and render groups do not exist, which is why docker/run.sh and docker/entrypoint-rocm.sh both use numeric host gids. That copy-paste block is no longer in the README (334e9b0 replaced it with a one-line pointer to the ROCm image and docker/run.sh --rocm), so there is nothing left here to get wrong.

The Docker section is NVIDIA only (--gpus all, install_nvidia_toolkit.sh)
while the feature list claims AMD support, and docker/DOCKERHUB.md said
'AMD GPUs are not supported by these images', which was true of those images
and is now a dead end since unsloth/unsloth-rocm is published. Both now link
to it.

Also percent-encodes the spaces in the sticker image URL.
@danielhanchen
danielhanchen force-pushed the docs/readme-agents-and-amd branch from 7eb2524 to 334e9b0 Compare September 16, 2026 04:18
@danielhanchen danielhanchen changed the title README: list the pi agent, point AMD users at the ROCm image README: point AMD users at the ROCm image Sep 16, 2026
The Docker section targets Linux / WSL, but WSL exposes /dev/dxg rather
than /dev/kfd, so the ROCm image cannot reach a GPU there.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37262407b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
```
Follow startup with `docker logs -f <container>`, where `<container>` is the ID printed by `docker run -d` or a name from `docker ps`. Studio is at `http://localhost:8000` (user `unsloth`), JupyterLab at `http://localhost:8888`. The two mounts keep different things across `docker rm`: the Hugging Face cache holds models you download (mounting your host cache also reuses what you already have), and the `unsloth-studio` volume holds your accounts, chats and trained models; each image brings its own Studio code, and a volume from an older image is migrated on the first start (its old code is kept under `.unsloth-studio-legacy/`). Tags (`unsloth/unsloth:core` for notebooks only), GPU support and options: [Docker Hub](https://hub.docker.com/r/unsloth/unsloth).

On AMD, use [`unsloth/unsloth-rocm`](https://hub.docker.com/r/unsloth/unsloth-rocm) or `docker/run.sh --rocm`, on native Linux: WSL exposes `/dev/dxg` rather than the `/dev/kfd` that ROCm needs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Clarify that the ROCm image does not provide Studio

For an AMD user following this Unsloth Studio Docker section, the suggested bare docker/run.sh --rocm does not start the service described above: docker/Dockerfile.rocm:262-263 defines the image command as python, and the image contains only the training stack rather than Studio. The wrapper therefore opens Python (or exits without a TTY), with nothing listening on ports 8000/8888. Qualify this as a scripts/training image and provide a command, or direct Studio users to the supported AMD Studio installation path.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct: Dockerfile.rocm ends in CMD ["python"] and the image carries the training stack only, so a bare run.sh --rocm in a Studio section is misleading. Fixed in d8655a8: the line now says it is a separate training-only image with no Studio or JupyterLab, and shows a command form (run.sh --rocm python /workspace/train.py).

The Docker section describes Studio, but the ROCm image ships the
training stack alone and its CMD is python, so a bare run.sh --rocm
opens a REPL with nothing on 8000 or 8888.
@unslothai unslothai deleted a comment from chatgpt-codex-connector Bot Sep 16, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8655a8724

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
```
Follow startup with `docker logs -f <container>`, where `<container>` is the ID printed by `docker run -d` or a name from `docker ps`. Studio is at `http://localhost:8000` (user `unsloth`), JupyterLab at `http://localhost:8888`. The two mounts keep different things across `docker rm`: the Hugging Face cache holds models you download (mounting your host cache also reuses what you already have), and the `unsloth-studio` volume holds your accounts, chats and trained models; each image brings its own Studio code, and a volume from an older image is migrated on the first start (its old code is kept under `.unsloth-studio-legacy/`). Tags (`unsloth/unsloth:core` for notebooks only), GPU support and options: [Docker Hub](https://hub.docker.com/r/unsloth/unsloth).

On AMD there is a separate image, [`unsloth/unsloth-rocm`](https://hub.docker.com/r/unsloth/unsloth-rocm) (`docker/run.sh --rocm python /workspace/train.py`). It carries the training stack only, so there is no Studio or JupyterLab in it, and it needs native Linux: WSL exposes `/dev/dxg` rather than the `/dev/kfd` that ROCm needs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the ROCm example at the mounted host directory

When a user places train.py in the current directory and copies this command, it fails with “can't open file”: docker/run.sh mounts the working directory at /workspace/host, while Dockerfile.rocm only puts smoke_test_rocm.py directly under /workspace. Use /workspace/host/train.py, matching the wrapper's existing training example.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct: docker/run.sh mounts the working directory at /workspace/host (run.sh:321), and Dockerfile.rocm only places smoke_test_rocm.py at /workspace, so the path I wrote does not exist in the container. Fixed in 4193592, which uses /workspace/host/train.py and names what that path is.

run.sh mounts the current directory at /workspace/host, so a bare
/workspace/train.py does not exist inside the container.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4193592d99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread README.md Outdated
```
Follow startup with `docker logs -f <container>`, where `<container>` is the ID printed by `docker run -d` or a name from `docker ps`. Studio is at `http://localhost:8000` (user `unsloth`), JupyterLab at `http://localhost:8888`. The two mounts keep different things across `docker rm`: the Hugging Face cache holds models you download (mounting your host cache also reuses what you already have), and the `unsloth-studio` volume holds your accounts, chats and trained models; each image brings its own Studio code, and a volume from an older image is migrated on the first start (its old code is kept under `.unsloth-studio-legacy/`). Tags (`unsloth/unsloth:core` for notebooks only), GPU support and options: [Docker Hub](https://hub.docker.com/r/unsloth/unsloth).

On AMD there is a separate image, [`unsloth/unsloth-rocm`](https://hub.docker.com/r/unsloth/unsloth-rocm) (`docker/run.sh --rocm python /workspace/host/train.py`, where `/workspace/host` is your current directory). It carries the training stack only, so there is no Studio or JupyterLab in it, and it needs native Linux: WSL exposes `/dev/dxg` rather than the `/dev/kfd` that ROCm needs.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make the ROCm example self-contained

For AMD users following this Docker quickstart without a source checkout, this command fails immediately because docker/run.sh is a repository-local executable and this section never clones or downloads it; merely pulling the linked image does not install the wrapper on the host. Add the required checkout/download step or provide a standalone docker run invocation.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, docker/run.sh is repository-local and this section never clones the repo, so the wrapper was not on the reader's host. Fixed in 34b82c9: the line now points at the ROCm Docker Hub page, which carries a standalone docker run command and the supported hardware, instead of naming a script the reader does not have.

docker/run.sh is repository-local, and this section never clones the
repo, so the command was unrunnable for anyone who only pulled the image.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 34b82c903c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 0c32c4f into main Sep 16, 2026
14 of 16 checks passed
@danielhanchen
danielhanchen deleted the docs/readme-agents-and-amd branch September 16, 2026 08:54
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
The README's Docker section only described the CUDA image, and docker/DOCKERHUB.md still said AMD GPUs are not supported by these images, which stopped being the whole story once unsloth/unsloth-rocm was published.

- README.md gains one line pointing AMD users at unsloth/unsloth-rocm, saying it carries the training stack only (no Studio, no JupyterLab) and that it needs native Linux, since WSL exposes /dev/dxg rather than the /dev/kfd ROCm needs.
- docker/DOCKERHUB.md now says these images are CUDA only and names the ROCm image, instead of a flat 'not supported'.
- The sticker URL had literal spaces; they are percent-encoded now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant