This project provides Docker containers for running ComfyUI with AMD ROCm support. The containers are automatically built and published to GitHub Container Registry (GHCR) with version management.
# Pull the latest stable release
docker pull ghcr.io/kramins/comfyui-amd:latest
# Or pull the git version (always pulls latest ComfyUI main branch at startup)
docker pull ghcr.io/kramins/comfyui-amd:git
# Or pull a specific version
docker pull ghcr.io/kramins/comfyui-amd:0.8.2
# Run the container
docker run --rm --privileged \
-v /dev:/dev \
-p 8188:8188 \
-v ~/comfyui/models:/data/models \
-v ~/comfyui/custom_nodes:/data/custom_nodes \
-v ~/comfyui/output:/data/output \
-v ~/comfyui/user:/data/user \
--name comfyui \
ghcr.io/kramins/comfyui-amd:latestAccess ComfyUI at http://localhost:8188
Images are published to: ghcr.io/kramins/comfyui-amd
latest- Most recent stable ComfyUI releasegit- Pulls latest ComfyUI main branch at container startup (always fresh)X.Y.Z- Specific ComfyUI release versions (e.g.,0.8.2,0.8.1)
- Release versions (
0.8.2, etc.): ComfyUI is downloaded during image build and remains fixed - Git version (
git): ComfyUI is cloned/pulled from GitHub main branch at container startup, ensuring you always have the latest changes without rebuilding the image
- Docker with buildx support
- AMD ROCm compatible hardware (for running)
# Build the git version (default)
./build-container.sh
# Build a specific version
./build-container.sh 0.8.2
# Build and push to GHCR (requires authentication)
./build-container.sh git --pushecho $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdinThe repository uses GitHub Actions to automatically build new ComfyUI versions:
- On push to main branch, checks for new ComfyUI releases
- Compares against existing GHCR tags
- Builds only new versions automatically
- First run builds the
gitversion plus last 5 releases
Trigger manual builds via GitHub Actions:
- Go to Actions → "Build ComfyUI Containers"
- Click "Run workflow"
- Optional: Specify version (e.g.,
git,0.8.2) or leave empty for auto-detect - Optional: Enable "force rebuild" to rebuild existing versions
build-container.sh: Local build script with version selection and push supportDockerfile: Multi-version container definition with AMD ROCmdocker-bake.hcl: Docker bake configuration for matrix buildsrun-container.sh: Container run scriptroot/start.sh: Container startup script (handles git pulls, dependencies, etc.).github/workflows/build.yml: Automated build workflow.github/scripts/detect-versions.sh: Version detection script
| Mount Point | Description |
|---|---|
/data/models |
ComfyUI model files (checkpoints, VAE, etc.) |
/data/custom_nodes |
Custom nodes and extensions |
/data/output |
Generated images and outputs |
/data/user |
User settings and configurations |
/data/input |
Input files for ComfyUI |
/data/temp |
Temporary files |
| Option | Description |
|---|---|
--rm |
Automatically remove container when it exits |
--privileged |
Required for AMD ROCm GPU access |
-v /dev:/dev |
Mount devices for GPU access |
-p 8188:8188 |
Expose ComfyUI web interface |
--name comfyui |
Container name for easy management |
| Variable | Default | Description |
|---|---|---|
COMFYUI_VERSION |
(from build) | ComfyUI version (git or X.Y.Z) |
BACKEND |
rocm |
Compute backend (ROCm for AMD) |
ROCM_VERSION |
6.4 |
ROCm version for PyTorch |
- Git version: Restart the container - it automatically pulls latest changes
- Release versions: Pull the new image tag from GHCR
- Local builds: Run build script with new version
MIT