Skip to content

Docker image that runs the comfyui main.py for Nvidia based servers.

License

Notifications You must be signed in to change notification settings

JEMeyer/comfyui-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Docker Publisher

This repository automatically publishes Docker images for the ComfyUI project whenever updates are pushed to its master branch.

Images

Two Docker images are published to the GitHub Container Registry for each update:

  • ghcr.io/jemeyer/comfyui:latest - Image tagged with latest pointing to the most recent commit.
  • ghcr.io/jemeyer/comfyui:COMMIT_HASH - Image tagged with the specific commit hash of the ComfyUI repository.

Usage

Docker Run

To use the most recent ComfyUI image, pull the latest tag:

docker run -p 8188:8188 ghcr.io/jemeyer/comfyui:latest

This will start ComfyUI and make it accessible at http://localhost:8188.

GPU Configuration

If you have an NVIDIA GPU and want to use it with ComfyUI, you can pass the --gpus flag to docker run:

  • To use all available GPUs:
docker run --gpus all -p 8188:8188 ghcr.io/jemeyer/comfyui:latest
  • To use a specific number of GPUs:
docker run --gpus 2 -p 8188:8188 ghcr.io/jemeyer/comfyui:latest
  • To use a specific GPU by its device ID (e.g., GPU 2):
docker run --gpus device=2 -p 8188:8188 ghcr.io/jemeyer/comfyui:latest

Note that you need to have the NVIDIA Container Toolkit installed on your host for GPU passthrough to work.

Docker Compose

You can also use ComfyUI with Docker Compose. Here's an example docker-compose.yml file:

services:
  comfyui:
    image: ghcr.io/jemeyer/comfyui:latest
    ports:
      - 8188:8188
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    volumes:
      - ./models:/app/models
      - ./input:/app/input
      - ./output:/app/output
      - user:/app/user
      - temp:/app/temp

volumes:
  user:
	temp:

This configuration will start a ComfyUI container using the latest image and make it accessible at http://localhost:8188. It also configures the container to use 1 GPU.

To use a specific GPU, you can use the device_ids property instead of count:

reservations:
  devices:
    - driver: nvidia
      device_ids: ["2"]
      capabilities: [gpu]

To use all available GPUs, set count to all.

Start the container with:

docker-compose up -d

Update Schedule

This repository checks for updates to the ComfyUI master branch on a daily basis. If a new commit is detected, and an image for that commit doesn't already exist, a new Docker image will be built and published.

You can also manually trigger the workflow to check for updates immediately.

Contributing

If you encounter any issues with the published Docker images, please open an issue in this repository.

Pull requests to improve the Docker image build process or the GitHub Actions workflow are welcome!

License

This project is licensed under the GPL-3.0 License - see the LICENSE file for details.

About

Docker image that runs the comfyui main.py for Nvidia based servers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages