git clone https://github.com/Dekita/runpod-serverless-comfyui-worker.git
Development:
docker-compose -f docker.compose.dev.yaml --build
Production:
docker-compose -f docker.compose.prod.yaml --build
docker-compose -f docker.compose.prod.yaml up
This will use the input data from test_input.json to run the job after which the container will exit.
docker-compose -f docker.compose.dev.yaml up --build
docker push dekita/runpod-serverless-comfyui-worker:dev
Replace repo path with your own repo details.
To run the Docker image on Windows, you will need to have WSL2 and a Linux distro (like Ubuntu) installed on Windows. You may also need to follow the steps below to ensure that your nvidia gpu is able to be 'passed through' to your container.
- Follow the guide on how to get WSL2 and Linux installed in Windows to install Ubuntu
- You can skip the "Install and use a GUI package" part as we don't need a GUI
- When Ubuntu is installed, you have to login to Ubuntu in the terminal:
wsl -d Ubuntu
- Update the packages:
sudo apt update
- Install Docker in Ubuntu & then install docker-compose
sudo apt-get install docker-compose
- Install the NVIDIA Toolkit in Ubuntu and create the
nvidia
runtime - Enable GPU acceleration on Ubuntu on WSL2 to use NVIDIA CUDA
- For the step "Install the appropriate Windows vGPU driver for WSL": If you already have your GPU driver installed on Windows, you can skip this
- Add your user to the
docker
group, so that you can use Docker withoutsudo
:sudo usermod -aG docker $USER
Thanks to runpod-worker-comfy, which this repo was initially based on, this repo contains two workflows that publish the image to Docker hub using Github Actions:
- docker-dev.yml: Creates the image and pushes it to Docker hub with the
dev
tag on every push to themain
branch - docker-release.yml: Creates the image and pushes it to Docker hub with the
latest
and the release tag. It will only be triggered when you create a release on GitHub
If you want to use this, you should add these secrets to your repository:
Configuration Variable | Description | Example Value |
---|---|---|
DOCKERHUB_USERNAME |
Your Docker Hub username. | your-username |
DOCKERHUB_TOKEN |
Your Docker Hub token for authentication. | your-token |
DOCKERHUB_REPO |
The repository on Docker Hub where the image will be pushed. | timpietruskyblibla |
DOCKERHUB_IMG |
The name of the image to be pushed to Docker Hub. | runpod-worker-comfy |