Welcome to your ultimate guide to running ComfyUI using the AI-Dock Docker image! Embracing the cloud-first approach, this setup allows for a highly configurable environment tailored for your AI projects. Here’s how to get started with ease and address any hiccups you might encounter along the way.
Getting Started
First, ensure that you have Docker installed on your machine. This will enable you to run the AI-Dock container effectively.
1. Pull the ComfyUI Docker Image
To get started, you should pull the ComfyUI image from the container registry. Use the following command:
docker pull ghcr.io/ai-dock/comfyui:latest
2. Use the Provisioning Script
The AI-Dock images do not come pre-configured with models or third-party configurations. Instead, we will utilize a provisioning script to automate the configuration of your container. Be sure to check out examples such as SD3 and FLUX.1 setups in the provisioning script directory for guidance.
3. Configure the Environment
When launching your ComfyUI container, additional environment variables can help tailor the experience. Here are some of the essential variables you might consider:
- AUTO_UPDATE: Set this to true to automatically update ComfyUI on startup.
- CIVITAI_TOKEN: Required for authenticated downloading of gated models from Civitai.
- COMFYUI_PORT_HOST: Override the default port (8188) for accessing the ComfyUI interface.
- HF_TOKEN: Needed for downloading gated models from HuggingFace.
4. Launch ComfyUI
To run your ComfyUI instance, execute the following command:
docker run -d -p 8188:8188 --env AUTO_UPDATE=true --env COMFYUI_PORT_HOST=8188 ghcr.io/ai-dock/comfyui:latest
5. Access ComfyUI
After launching, visit http://localhost:8188 in your web browser to access the ComfyUI interface.
Understanding the Docker Image Configuration
Imagine you are setting up a new kitchen to cook your favorite meal. In this analogy, the Docker image is like the kitchen – it provides you with all the tools and ingredients needed to create a dish (in this case, a fully functional AI model). Just as some cooking configurations can be pre-set for convenience, you can use environment variables in Docker to adjust the settings without having to start from scratch. Each dish might call for different utensils (environment variables), just like your AI application might need specific configuration to run smoothly.
Troubleshooting
If you run into issues while launching the ComfyUI container, consider the following troubleshooting steps:
- Ensure that Docker is running on your machine.
- Check for any typos in your commands or environment variable names.
- Try pulling the latest Docker image again to ensure you have the most recent version.
- If issues persist, refer to the base wiki for additional documentation.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
This guide outlines the essential steps to run ComfyUI within an AI-Dock Docker container. By leveraging thoughtful configuration and using the provisioning script, you are well-equipped to harness the power of AI in your projects. At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

