Linux
On Linux, the recommended setup is a docker image.
This way you can package a version of ComfyUI, copy it to any machine and use it.
So far we have done some research only.
We have not done tests so far.
And the docker management in the rrClient is not ready yet.
If there is interest in a Linux, please let us know.
Create Docker image
Since you want to build a truly portable and professional rendering environment for Linux, here is the complete step-by-step guide.
This workflow ensures your environment is frozen at "Version 0.12" while keeping all your heavy assets on your local machine.
1. Prepare the Dockerfile
The Dockerfile is your blueprint. It defines the operating system, the Python version, and all necessary dependencies.
Create a file named Dockerfile and paste the following:
|
# Use NVIDIA's official PyTorch base image for hardware acceleration FROM pytorch/pytorch:2.1.2-cuda12.1-cudnn8-runtime # Install system dependencies required for OpenCV and Git RUN apt-get update && apt-get install -y \ git \ libgl1-mesa-glx \ libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* # Set the working directory inside the container WORKDIR /app # Clone the ComfyUI repository RUN git clone https://github.com/comfyanonymous/ComfyUI.git . # Install Python requirements RUN pip install --no-cache-dir -r requirements.txt # Expose the internal port to the outside world EXPOSE 8188 # Launch ComfyUI and ensure it listens to all network interfaces CMD ["python", "main.py", "--listen", "0.0.0.0"] |
2. Build and Version the Image
Open your terminal in the folder where your Dockerfile is located.
Run the following command to "bake" the image.
We will tag it as v0.12 to distinguish it from future versions.
|
# Build the image and name it comfyui with the tag v0.12 docker build -t comfyui:v0.12 . |
3. Export the Image for Portability
To move this image to another computer without using a registry (like Docker Hub), you can export it as a single .tar file.
|
# Export the image to a portable archive docker save comfyui:v0.12 > comfyui_v0.12.tar |
You can now copy this comfyui_v0.12.tar file via USB stick or network to any other Linux machine.
4. Load the Image on the Target Machine
On the rendering machine, ensure Docker and the NVIDIA Container Toolkit are installed.
Then, import the image:
|
# Import the portable archive back into Docker docker load < comfyui_v0.12.tar |
5. Start the Container with Local Asset Mapping
This is the most important step.
You want the container to be "empty" and load all your models and nodes from your local hard drive.
This keeps the container fast and your data safe.
|
# Define your local path where your models and nodes are stored LOCAL_DATA="/home/user/my_comfy_assets" # Run the container with full GPU access and persistent local folders docker run -d \ --name comfy_render_node \ --gpus all \ -p 8188:8188 \ -v "$LOCAL_DATA/models:/app/models" \ -v "$LOCAL_DATA/input:/app/input" \ -v "$LOCAL_DATA/output:/app/output" \ -v "$LOCAL_DATA/user:/app/user" \ -v "$LOCAL_DATA/temp:/app/temp" \ -v "$LOCAL_DATA/custom_nodes:/app/custom_nodes" \ comfyui:v0.12 |