Repository navigation
README: point AMD users at the ROCm image - #11066
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
| ``` | ||
| 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. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
| ```bash | ||
| docker run --rm -it \ | ||
| --device /dev/kfd --device /dev/dri \ | ||
| --group-add video --group-add render \ |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
7eb2524 to
334e9b0
Compare
The Docker section targets Linux / WSL, but WSL exposes /dev/dxg rather than /dev/kfd, so the ROCm image cannot reach a GPU there.
|
@codex review |
|
@codex security review |
There was a problem hiding this comment.
💡 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".
| ``` | ||
| 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. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
| ``` | ||
| 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. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
|
@codex review |
There was a problem hiding this comment.
💡 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".
| ``` | ||
| 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. |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
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.
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.
The Docker section documents
--gpus allandinstall_nvidia_toolkit.shwhile the feature list says we support AMD, anddocker/DOCKERHUB.mdsaid "AMD GPUs are not supported by these images". That was accurate about those images, and is now a dead end sinceunsloth/unsloth-rocmis 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
README.mdwas checked, 100 unique URLs, for status and page title. None are broken; the only non-200s are Reddit andunsloth.ai/downloadblocking automated requests.tests/studio -k "readme or docker_hub or dockerhub": 3 passed.git diff --checkclean.