Skip to content

Docker ROCm Studio image: ship JupyterLab with the notebooks, as the CUDA image does - #11286

Merged
danielhanchen merged 17 commits into
unslothai:mainfrom
LeoBorcherding:feat/rocm-docker-jupyterlab
Sep 21, 2026
Merged

danielhanchen merged 17 commits into
unslothai:mainfrom
LeoBorcherding:feat/rocm-docker-jupyterlab

Conversation

@LeoBorcherding

@LeoBorcherding LeoBorcherding commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

unsloth/unsloth:studio runs Studio on :8000 and JupyterLab on :8888 with the Unsloth notebooks preloaded. The ROCm Studio image from #11218 runs Studio alone, so an AMD user who follows the Docker quickstart has nowhere to open a notebook. The CUDA core image already carries JupyterLab, the notebook tooling and the notebooks, which Dockerfile.studio inherits; the ROCm base carries none of it.

Stacked on #11218 (its two commits are in this branch).

Scope note. An earlier revision of this branch also enabled key-only sshd on :22. That rode along with the notebooks and had no argument of its own, so it was stripped in c213eef07: openssh-server is not installed, EXPOSE is 8000 8888, and studio_launch.sh's existing command -v sshd gate keeps the shared supervisord program down. Key-only SSH into a 57 GB GPU container is a much bigger surface than a notebook editor, and nothing in #11235 asks for it.

Changes

All in docker/Dockerfile.studio-rocm, mirroring the CUDA files piece by piece:

  • jupyterlab, notebook and ipywidgets into the base venv at the CUDA core image's pins, so the kernel is the ROCm torch. The resolve runs against pypi alone, where a moved torch would be a CUDA wheel, so the base torch is asserted unmoved.
  • the labext-builder stage (Node 20, jlpm build:prod) for the Unsloth Dark theme and cell-nav keymap. jlpm is installed into that stage's venv, since the base has no jupyterlab.
  • the branding chain (favicons, logo, login.html, sloth stickers, the labextension disable/lock pairs) and the unsloth_branding --verify guard, both against /opt/unsloth-venv as on CUDA.
  • the pip/uv shim, the IPython startup hook and the notebook sync/view tooling from docker/Dockerfile, plus unslothai/notebooks baked as the read-only template. The build fails if the ref carries no AMD-* notebook, since that set is the point of the image.
  • supervisord running Studio and JupyterLab together through the shared studio_launch.sh, replacing the single-service CMD. Both docker/supervisord.conf and docker/studio_launch.sh are already on main driving the CUDA Studio image; this points the ROCm image at them rather than adding a second mechanism.

entrypoint-rocm.sh gains the two hooks entrypoint.sh has on CUDA: link Studio's code into the home before anything reads it (a volume on the home hides the build-time link), and sync the notebooks before every exec. Both are no-ops on the base image, which has neither script. The Studio image reinstalls the entrypoint, since the published base predates them.

studio_launch.sh keeps HSA_/HIP_/ROCM_/ROCR_/ROCBLAS_ variables in the profile it writes for login shells. Nothing here arrives over SSH, but a JupyterLab terminal and docker exec -it ... bash -l are login shells too and see no docker run -e value otherwise, so a terminal sees the same ROCBLAS_USE_HIPBLASLT=1 as the Studio and Jupyter processes.

No transformers sidecars: the CUDA image derives its set from the vLLM it carries, and this image carries none, so a notebook's transformers==X pin is recorded by the shim and the base venv's transformers is used.

tests/python/test_docker_studio_rocm_jupyter.py pins the jupyterlab pins, the branding chain and the notebook helper list to the CUDA files they mirror, the supervisord programs to what the Dockerfile installs, the entrypoint hook order, and every COPY source to the .dockerignore allow-list.

Verification

Built at ad4000ec66 on unsloth/unsloth-rocm@sha256:2b62b0e5 (published 2026-09-15) with UNSLOTH_STUDIO_REF=14b40739a0 and UNSLOTH_NOTEBOOKS_REF=bce1b9d1. Host: Windows 11 26200, Docker Desktop 4.74 (engine 29.4.3, WSL2 backend), Radeon AI PRO R9700 seated, --device /dev/dxg, UNSLOTH_SKIP_GPU_CHECK=1.

check result
build passed; JupyterLab install left torch at 2.12.1+rocm7.2; branding guard passed; 153 AMD-* notebooks baked
supervisord jupyter RUNNING, studio RUNNING, studio-password EXITED (one-shot); ready banner printed with both URLs
JupyterLab /login 200 with the attribution line; Unsloth Dark theme, logo and splash locks in place; file browser opens on Unsloth Notebooks, folder 26 AMD Notebooks holds all 153
Studio / and /api/health 200
kernel a notebook run through nbconvert --execute: UNSLOTH_NB_SHIM=1, pip resolves to the shim, !pip install torch bitsandbytes "transformers==4.56.2" prints kept baked versions, skipped: torch bitsandbytes transformers==4.56.2, torch unchanged afterwards
branding guard python -m unsloth_branding --verify passes inside the running container
size 57.2 GB against 30 GB for the base; #11218's Studio layer is 19 GB of that, this PR adds about 0.5 GB

Not verified: the GPU. Through Docker Desktop's /dev/dxg the torch wheel's bundled HSA runtime has no DXG path (hsaKmtOpenKFD undefined), which is what #11212 addresses, so torch.cuda.is_available() was False in both venvs and no notebook trained. Also untested: a Linux host with /dev/kfd (any card), a per-arch ROCM_GFX= base, the Cloudflare tunnel, and docker run --user <uid>. Everything JupyterLab-side is host-independent, so those gaps are about the training half, not this diff.

Fixes #11235

Cross-platform CI

The org Actions queue is 200+ runs deep, so the checks on this PR have not reported. Run on owned staging repos instead, at c213eef07:

leg result
ubuntu-latest, the two ROCm docker suites 70 passed
macos-15 (Apple Silicon), same 70 passed
windows-latest, same collection error, main's, fixed in #11457
full repo suite (Backend CI, Linux) 8034 + 11465 passed; 8 failures, all 8 reproduced on a clean origin/main worktree

The Windows error is tests/python/test_docker_rocm.py:548, an unguarded os.geteuid() in a skipif decorator that has been there since #10820 and is byte-identical on main. os.geteuid does not exist on Windows and a skipif is evaluated at collection, so it takes the whole module down instead of skipping one test. The org CI runs the Python suites on Linux only, which is why it has never been seen.

The 8 staging failures are five Studio frontend contract tests, test_source_read_encoding (naming studio/backend/tests/test_reset_password_command.py) and test_formatter_fixed_point. The first seven fail identically on origin/main; the last one was this branch's and pre-commit.ci fixed it in a5bc8f44d.

…d supervisord, as the CUDA image does

unsloth/unsloth:studio runs Studio on :8000 and JupyterLab on :8888 with the
Unsloth notebooks preloaded; the ROCm Studio image ran Studio alone. The CUDA
core image already carries JupyterLab, the notebook tooling and the notebooks,
so Dockerfile.studio inherits them; the ROCm base carries none, so this
installs the lot in Dockerfile.studio-rocm:

- jupyterlab, notebook and ipywidgets into the base venv at the CUDA image's
  pins, with the base torch asserted unmoved by the resolve
- the labext-builder stage (Node 20, jlpm build:prod) for the Unsloth Dark
  theme and cell-nav keymap, jlpm installed into that stage since the base has
  none
- the branding chain (favicons, logo, login.html, sloth stickers, the
  labextension disable/lock pairs) and the unsloth_branding --verify guard
- the pip/uv shim, the IPython startup hook and the notebook sync/view tooling
  from docker/Dockerfile, plus unslothai/notebooks baked as the read-only
  template; the build fails if the ref carries no AMD-* notebooks
- supervisord running Studio, JupyterLab and key-only sshd through the shared
  studio_launch.sh, replacing the single-service CMD

entrypoint-rocm.sh gains the two hooks entrypoint.sh has on the CUDA image:
link Studio's code into the home before anything reads it, and sync the
notebooks before every exec. Both are no-ops on the base image. The Studio
image reinstalls the entrypoint, since the published base predates them.

studio_launch.sh keeps the HSA_/HIP_/ROCM_/ROCR_/ROCBLAS_ variables in the
profile it writes for SSH login shells, so an SSH session runs on the same
ROCm configuration as Studio and Jupyter.

tests/python/test_docker_studio_rocm_jupyter.py pins each piece to the CUDA
file it mirrors, the entrypoint hook order, and the .dockerignore allow-list.

Fixes unslothai#11235
pre-commit-ci Bot and others added 5 commits September 18, 2026 18:39
…its header a launch line that works

The workflow built only Dockerfile.rocm, so Dockerfile.studio-rocm was never
published and the comment saying CI pins its refs described a job that did not
exist. build-studio now layers it on the base this run pushed, by digest and
with the same UNSLOTH_REF / zoo ref, and tag-studio gives it every base tag
with a -studio leaf under the same gates (:studio beside :latest). The Hub
page syncs once both moved and documents the tag.

The header pointed WSL2 users at `docker/run.sh --rocm`, which has no DXG path
on main (that is unslothai#11212), picks :latest, and publishes no port; the by-hand
line passed group names, which the image cannot resolve. Both lines now say
what actually works, and WSL2 is named as waiting on unslothai#11212.
…pyterlab

# Conflicts:
#	docker/Dockerfile.studio-rocm
… the studio tag's JupyterLab on the Hub page

@LeoBorcherding LeoBorcherding left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Codex findings, via a mirror

Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#7. It looked at 274f61ad11 there, which is this PR's bdadf4eb2 replayed onto main df18fa7bd. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.

1 finding, inline below where the line is on this diff.

Comment thread docker/Dockerfile.studio-rocm Resolved
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed bfc1d69.

The ROCm publisher never built Dockerfile.studio-rocm: docker-publish-rocm.yml had one build step, on Dockerfile.rocm, so unsloth/unsloth-rocm:studio existed only as the manual buildx line in the Dockerfile header. The build-studio and tag-studio jobs that fix that landed on #11218 (efba222d87, the base of this stack), so this branch now carries #11218's current head instead of its first two commits. This PR's own share of the gap:

  • build-studio passed no UNSLOTH_NOTEBOOKS_REF, so the notebooks layer would have baked a mutable main; docker matches a RUN layer on its command string, so the next run would reuse the first build's set under a new digest. The workflow now takes a notebooks_ref dispatch input, freezes it to one commit in prepare as docker-publish.yml does, passes it to build-studio, and an overridden notebooks ref drops the stable tags like every other override. Tests: the build-arg is asserted next to the Studio refs, a run of the build_args step with notebooks_ref=some-branch gives stable=false, and every ARG after the final FROM in the Dockerfile must be passed by the publisher, so the next such ARG cannot go unfrozen either.
  • The Hub page said the studio tag was "still without JupyterLab" and published only :8000. It now describes JupyterLab on :8888 and key-only sshd, and the run line publishes both ports.

build.sh is unchanged: it does not build the CUDA Dockerfile.studio either (its CUDA path is a bare docker build .), so the ROCm side matches, and the header's buildx line is the local route on both.

Run: tests/python/test_docker_rocm.py and test_docker_studio_rocm_jupyter.py on WSL2 Ubuntu 24.04, 50 passed / 1 skipped before this commit, 52 / 1 after; the two new tests fail against the workflow as merged from #11218 (UNSLOTH_NOTEBOOKS_REF missing, stable=true on an overridden ref). Not run: the publisher itself, which needs the org's DOCKER_API_KEY; the new step has only a bash -n and the static tests behind it.

CI at bdadf4eb2: the five red jobs (Repo tests (CPU, studio), (Python 3.13, rest), the three Core zoo legs) are red on main at 6e262b1b6a too, runs 35379669649 and 35379669657, same job names.

@LeoBorcherding LeoBorcherding left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Codex findings, via a mirror

Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#7. It looked at a7dfd88787 there, which is this PR's bfc1d6927 replayed onto main df18fa7bd. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.

2 findings, inline below where the line is on this diff.

Comment thread docker/Dockerfile.studio-rocm Resolved
Comment thread docker/Dockerfile.studio-rocm Resolved
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed 1632420.

  • The Studio installer got the base's torch index but not its gfx. With the index pinned, install.sh skips the reroute that would notice gfx906, and the builder has no GPU to probe, so on a gfx906 base it installed the prebuilt bitsandbytes (no gfx906 kernels) into the Studio venv while the base venv deliberately carries none. ROCM_GFX from /etc/unsloth-rocm-build is now forwarded as UNSLOTH_ROCM_GFX_ARCH. Empty on the generic build, which every reader treats as unset; llama.cpp stays the CPU bundle because UNSLOTH_LLAMA_CPP_BACKEND=cpu wins over a forwarded arch in install_llama_prebuilt.py. Reproduced by running _is_gfx906_bnb_skip out of install.sh with a pinned index and no probe: install without the variable, skip with gfx906. The gfx906 test in tests/python/test_docker_rocm.py now asserts the forward. The same line is in Docker ROCm image: ship Unsloth Studio, as the CUDA image already does #11218 and needs the same change there.
  • The header's two run examples had lost their line continuations and were one line each with literal # in the middle, so a pasted copy ran an assignment or a bare docker run. Restored; both pass bash -n as one command each.

Run: the two docker test files on WSL2 Ubuntu 24.04, 52 passed / 1 skipped, the new assertion failing at d7c45d6 first. Not run: an image build.

@LeoBorcherding LeoBorcherding left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Codex findings, via a mirror

Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#7. It looked at e169828b85 there, which is this PR's 1632420b3 replayed onto main 9f76c5a3e. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.

1 finding, inline below where the line is on this diff.

Comment thread docker/Dockerfile.studio-rocm Resolved
@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed 4838185.

The image baked JupyterLab and nothing the notebooks import at runtime. The CUDA core image installs soundfile, evaluate, jiwer, librosa, decord, omegaconf, einx, tensorboard, matplotlib, langid, easydict and ftfy plus system ffmpeg, because the notebooks' install cells declare them and the shim then keeps those cells from moving the stack; the ROCm base has none of them (checked in unsloth/unsloth-rocm@sha256:2b62b0e5: all absent, no numba, no ffmpeg), so 28 of the baked AMD-* notebooks would have failed at import evaluate and the audio ones at import soundfile. The same pins now go into the JupyterLab layer, ffmpeg into the apt line, and numpy is asserted unmoved beside torch since librosa pulls numba. Two are deliberately not mirrored and a test names them: torchcodec, which has no wheel on any pytorch.org rocm index, so a notebook's own pip install torchcodec is forwarded by the shim rather than baked into a venv it cannot load in; and protobuf, where the base already carries a newer one than the CUDA pin.

Run: the exact new apt and pip lines executed inside the published base, torch 2.12.1+rocm7.2 and numpy 2.5.3 unchanged afterwards, numba 0.67.0 resolved, every listed package imports. Test added to tests/python/test_docker_studio_rocm_jupyter.py pinning the set to docker/Dockerfile; it fails at 1632420 with all twelve missing. Not run: a full image rebuild, or a notebook end to end.

@LeoBorcherding LeoBorcherding left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Codex findings, via a mirror

Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#8. It looked at 00ee24ca5c there, which is this PR's 4838185d9 replayed onto main 9f76c5a3e. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.

1 finding, inline below where the line is on this diff.

@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author

Pushed a24487c.

The base's tag job ran as soon as the base digest existed, and the Studio build waited on it, so :latest and the release tags moved before Studio had built. A failed Studio build then left :latest on the new base and :studio on the previous one, which is the pairing the Hub page rules out. build-studio now waits on the base digest only, tag waits on both digests, and tag-studio follows tag, so no tag moves until both images exist and the two tag sets move back to back. The test in tests/python/test_docker_rocm.py asserts that order; it fails at 4838185.

Two default-branch runs can still overlap, since each gets its own concurrency group so a burst is not discarded, and an older run's tag pair can land after a newer run's. This commit shrinks that window from the length of a Studio build to the minutes the two tag jobs take; closing it would mean serialising main runs, which the workflow declines to do for the reason at its concurrency block.

Run: the two docker test files on WSL2 Ubuntu 24.04, 53 passed / 1 skipped. Not run: the workflow.

@LeoBorcherding LeoBorcherding left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Codex findings, via a mirror

Codex does not answer on this repository, so it ran against a copy of this pull request's commits at LeoBorcherding/unsloth-staging-review#8. It looked at c9df8c068a there, which is this PR's a24487ce6 replayed onto main 847e70f96. Nothing was reviewed or resolved on the copy: the findings are here, in Codex's words, to be worked through on this pull request.

Codex found no major issues. Its comment: https://github.com/LeoBorcherding/unsloth-staging-review/pull/8#issuecomment-5737282024

@LeoBorcherding

Copy link
Copy Markdown
Collaborator Author
image

@danielhanchen

Copy link
Copy Markdown
Member

Checked this against docker/Dockerfile.studio and docker-publish.yml and the mirroring looks right, including the frozen notebooks ref and the new build-studio and tag-studio jobs. Since it carries #11218's commits, I will review the two together, and please confirm the intent that the base tag job now waits on the Studio build so a Studio failure holds latest back.

…ion of it

This branch is stacked on unslothai#11218, which has since been squash-merged, so main
and the branch carry the same work under different SHAs and three files
conflicted: the ROCm publish workflow, the Hub page and Dockerfile.studio-rocm.
No commit on main has touched any of them since that merge, so the branch side
is the later revision in each case and is kept.

Two places needed more than "keep ours":

The Hub page. The branch predates unslothai#11212, so taking its copy wholesale silently
reverted the WSL2 section that PR added: the /dev/dxg flags, the librocdxg
mount and the per-architecture build note. Rebuilt from main instead, with only
this branch's three real additions applied (the studio tag row, the studio
paragraph, and 8888 in the run command). test_the_hub_page_gives_the_same_wsl_
flags_as_run_sh caught the revert.

Two tests in test_docker_rocm.py still pinned unslothai#11218's shape, which this PR
deliberately replaces:

- the image now runs the shared studio_launch.sh under supervisord rather than
  the single-service studio_launch_rocm.sh, so the assertion follows the
  Dockerfile, and the supervisord program list is covered by the new suite.
- the auto-merge left TWO copies of the publish test, the branch's updated one
  and main's older one, which asserts `"tag-studio" not in wf["jobs"]`. That is
  exactly the job this PR adds, so the stale copy is removed rather than the
  survivor weakened.

778 docker tests pass, 2 skipped.
This PR is for the notebooks: JupyterLab beside Studio on the AMD image, with
the AMD-* set baked in and pinned by the publish workflow. sshd rode along with
it and has no argument of its own here, so it comes out. Key-only SSH into a
57 GB GPU container is a bigger surface than a notebook editor, and nothing in
issue unslothai#11235 asks for it.

supervisord stays. It is not something this PR adds: docker/supervisord.conf
and docker/studio_launch.sh are already on main, driving the CUDA studio image,
and this branch only points the ROCm image at them. Running Studio and
JupyterLab in one container is what it is for, and dropping it would mean
inventing a second way to do that for ROCm alone.

So the removal is confined to this image:

- openssh-server is no longer installed, and EXPOSE is 8000 8888
- studio_launch.sh already gates on `command -v sshd`, so with no binary
  UNSLOTH_ENABLE_SSHD stays false and the shared supervisord program never
  starts. The ENV default stays, because supervisord.conf is shared with the
  CUDA image and still expands %(ENV_UNSLOTH_ENABLE_SSHD)s on startup
- the Hub page drops both mentions of key-only SSH

test_every_supervisord_program_is_installed_by_the_dockerfile asserted the
opposite for the sshd program; it now asserts the absence, the gate and the
default together, so reinstating openssh-server without a decision fails.
test_ssh_login_shells_keep_the_rocm_variables is renamed rather than deleted:
the /etc/profile.d export still matters, because a JupyterLab terminal and
`docker exec -it ... bash -l` are login shells too and see no `docker run -e`
value otherwise, which is exactly how a notebook would end up on a different
HSA_OVERRIDE_GFX_VERSION than the Studio process.

788 docker tests pass, 13 skipped.
@danielhanchen

Copy link
Copy Markdown
Member

Stripped this down to the JupyterLab and notebooks work, and pushed it to the branch (c213eef07).

sshd is out. It rode along with the notebooks and has no argument of its own here: key-only SSH into a 57 GB GPU container is a much bigger surface than a notebook editor, and nothing in #11235 asks for it. openssh-server is no longer installed, EXPOSE is 8000 8888, and both mentions of key-only SSH are gone from the Hub page. studio_launch.sh already gates on command -v sshd, so with no binary present UNSLOTH_ENABLE_SSHD stays false and the supervisord program never starts. The ENV default stays, because supervisord.conf is shared with the CUDA image and expands %(ENV_UNSLOTH_ENABLE_SSHD)s at startup regardless.

supervisord stays, and I want to be clear that it is not something this PR adds. docker/supervisord.conf and docker/studio_launch.sh are already on main driving the CUDA studio image; this branch only points the ROCm image at them, and running Studio and JupyterLab in one container is what they are for. Removing it would mean inventing a second way to do that for ROCm alone.

Two test changes rather than deletions:

  • test_every_supervisord_program_is_installed_by_the_dockerfile asserted openssh-server was installed for the shared sshd program. It now asserts the absence, the command -v sshd gate and the false default together, so putting openssh-server back fails the suite instead of passing quietly.
  • test_ssh_login_shells_keep_the_rocm_variables is renamed, not dropped. The /etc/profile.d export still matters without sshd: a JupyterLab terminal and docker exec -it ... bash -l are login shells too, and see no docker run -e value otherwise. That is exactly how a notebook ends up on a different HSA_OVERRIDE_GFX_VERSION than the Studio process.

788 docker tests pass, 13 skipped.

Still worth knowing before this goes in: your verification had torch.cuda.is_available() False throughout, so no notebook in this image has trained on a GPU yet. JupyterLab serving, the branding and the pip shim are evidenced; the thing the notebooks exist to do is not.

@shimmyshimmer

Copy link
Copy Markdown
Member

Review record for #11286, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#50.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1 — reviewed mirror 993abb579 (no equivalent commit found on this PR)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 993abb579c

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror 993abb579 (no equivalent commit found on this PR).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

@danielhanchen

Copy link
Copy Markdown
Member

Cross-platform CI on this head, off the org queue (the org queue is 200+ runs deep right now, which is why the checks above have not reported):

runner result
ubuntu-latest 70 passed
macos-15 (Apple Silicon) 70 passed
windows-latest collection error

The Windows failure is not this PR's. tests/python/test_docker_rocm.py:548 has carried an unguarded @pytest.mark.skipif(os.geteuid() == 0, ...) since #10820, and os.geteuid does not exist on Windows. A skipif decorator is evaluated at collection, so it raises AttributeError during import and takes the whole module down instead of skipping one test:

tests/python/test_docker_rocm.py:548: in TestRocmEntrypoint
    @pytest.mark.skipif(os.geteuid() == 0, reason = "root reads a mode-0 file")
E   AttributeError: module 'os' has no attribute 'geteuid'

The line is byte-identical on main and on this branch. It has never been caught because the org CI runs the Python suites on Linux only. Fixed separately in #11457, along with the three other files that have the same shape, plus a scan so the next one is not invisible either. Nothing there is needed for this PR to be correct.

@danielhanchen danielhanchen changed the title Docker ROCm Studio image: ship JupyterLab with the notebooks, sshd and supervisord, as the CUDA image does Docker ROCm Studio image: ship JupyterLab with the notebooks, as the CUDA image does Sep 21, 2026
@danielhanchen
danielhanchen merged commit b19b41b into unslothai:main Sep 21, 2026
12 of 14 checks passed
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…CUDA image does (unslothai#11286)

The ROCm Studio image from unslothai#11218 runs Studio alone, so an AMD user who follows the
Docker quickstart has nowhere to open a notebook. The CUDA core image already carries
JupyterLab, the notebook tooling and the notebooks, which Dockerfile.studio inherits;
the ROCm base carries none of it, so Dockerfile.studio-rocm installs it itself, piece
by piece against the CUDA files, with a suite pinning the two together.

supervisord and studio_launch.sh are not new here: both are already on main driving the
CUDA Studio image, and this points the ROCm image at them rather than adding a second
way to run two services in one container.

An earlier revision also enabled key-only sshd on :22. That rode along with the
notebooks and had no argument of its own, so it was stripped: openssh-server is not
installed, EXPOSE is 8000 8888, and studio_launch.sh's existing `command -v sshd` gate
keeps the shared supervisord program down.

The org Actions queue is 200+ runs deep, so this PR's own checks never reported. Run on
staging instead: 70 passed on ubuntu-latest and on macos-15, and the full repo suite at
8034 + 11465 passed. Eight failures there, seven of which reproduce on a clean
origin/main worktree and one of which pre-commit.ci fixed on the branch. The
windows-latest leg errors on an unguarded os.geteuid() that has been in
tests/python/test_docker_rocm.py since unslothai#10820, byte-identical on main; fixed separately
in unslothai#11457.

Not verified: the GPU. The author's run went through Docker Desktop's /dev/dxg, where
the torch wheel's bundled HSA runtime has no DXG path, so torch.cuda.is_available() was
False and no notebook in this image has trained.

Closes unslothai#11235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] AMD: the ROCm Docker image has no JupyterLab, so the notebooks have no AMD on-ramp

3 participants