Parameterize image, name, restart, and GPU
This commit is contained in:
@@ -1,11 +1,35 @@
|
||||
# docker-comfyui
|
||||
|
||||
Build and run ComfyUI in a container. This build targets NVIDIA by basing it
|
||||
on the CUDA PyTorch runtime image. The only extra dependencies needed are
|
||||
`git`, to clone the official ComfyUI repository, and `build-essential` for
|
||||
`gcc`, which Triton requires. The image pulls a specific, pinned ComfyUI
|
||||
version via the `COMFYUI_VERSION` build arg. The build merely shallow-clones
|
||||
the repo and installs its requirements with `pip`. Kept intentionally simple.
|
||||
Build and run ComfyUI in a container. This build targets NVIDIA by basing it on
|
||||
the CUDA PyTorch runtime image. The only extra dependencies needed are `git`, to
|
||||
clone the official ComfyUI repository, and `build-essential` for `gcc`, which
|
||||
Triton requires. The image pulls a specific, pinned ComfyUI version via the
|
||||
`COMFYUI_VERSION` build arg. The build merely shallow-clones the repo and
|
||||
installs its requirements with `pip`. Kept intentionally simple.
|
||||
|
||||
### `.env` configuration
|
||||
|
||||
- `IMAGE`
|
||||
- Image name
|
||||
- Default: `localhost/comfyui`
|
||||
- `VERSION`
|
||||
- Image tag
|
||||
- Default: `latest`
|
||||
- `NAME`
|
||||
- Container name
|
||||
- Default: `comfyui`
|
||||
- `RESTART`
|
||||
- Restart policy
|
||||
- Default: `unless-stopped`
|
||||
- `ENDPOINT`
|
||||
- Host bind
|
||||
- Default: `127.0.0.1:8188`
|
||||
- `DATA`
|
||||
- Host directory holding all persistent data
|
||||
- Default: `./data`
|
||||
- `GPU`
|
||||
- CDI device
|
||||
- Default: `nvidia.com/gpu=all`
|
||||
|
||||
### Quick start
|
||||
|
||||
|
||||
+4
-4
@@ -2,9 +2,9 @@ services:
|
||||
comfyui:
|
||||
build:
|
||||
context: .
|
||||
image: localhost/comfyui:latest
|
||||
restart: unless-stopped
|
||||
container_name: comfyui
|
||||
image: ${IMAGE:-localhost/comfyui}:${VERSION:-latest}
|
||||
container_name: ${NAME:-comfyui}
|
||||
restart: ${RESTART:-unless-stopped}
|
||||
ports:
|
||||
- "${ENDPOINT:-127.0.0.1:8188}:8188"
|
||||
volumes:
|
||||
@@ -15,4 +15,4 @@ services:
|
||||
- ${DATA:-./data}/custom_nodes:/app/custom_nodes
|
||||
- ${DATA:-./data}/triton-cache:/root/.triton
|
||||
devices:
|
||||
- nvidia.com/gpu=all
|
||||
- ${GPU:-nvidia.com/gpu=all}
|
||||
|
||||
Reference in New Issue
Block a user