Conversation
|
Thanks for making this PR. I'm going to give this a try on Win11 with a RTX4090. |
|
Tried your latest changes - entrypoint.sh is not mounted in the container. So following your README steps 1:1 results in an error. |
@Ambrosiussen That's strange; the image shouldn't have even completed its build if ENTRYPOINT []
CMD pwd; ls -laedit: |
|
Okay so I tried a couple things:
|
|
I believe I figured it out. The error message Theoretically, adding the I’ll push a fix soon. After that, you can run: |
|
What’s catching my attention now is the message: |
1250f8d to
3f8cb79
Compare
|
Hello, I'm @yt-koike, the starter of PR named Please publish Docker image with GitHub workflow. I appreciate @bbergeron0 and @Ambrosiussen s' good job and I am willing to help you all! As my first contribution to this PR, I make some little suggestions as follows to make the code better.
Docker officially says compose file should be named as
As you possibly know, the following commands can be shortened as If the user does not modify the code at all and there's no need to build the image on every start, Thank you :) |
|
Just to provide my update - latest version of the PR works well! EDIT: There is actually one change I would propose, as this is something you have to do for custom nodes, workflows (user scene files) and python venvs to work. In the compose under volumes, you should just mount the entire comfy folder to the container. |
|
Hi @yt-koike, thanks for your support! I'll add your hardware to the "testing" section of my PR. Could you also provide your OS? (I assume "PC" implies Windows 11, but I just want to be sure.)
I've never seen a
I'm planning on improving the documentation, so I'll see whether I shorten it for convenience or expand it for clarity and explanation. @Ambrosiussen Thanks for the feedback. If I understand correctly, you're still seeing the
The Dockerfile already creates persistent volumes for user-generated data (input, output, temp, user), the virtual environment, custom nodes, models, and the ComfyUI user. The volumes worth mounting are documented inside volumes:
# Share custom nodes and models with the container.
- ./custom_nodes:/comfyui/custom_nodes
- ./models:/comfyui/models
# Optional: mount the user data directory.
#- data:/data/I thought about it previously, but I decided against it. Some parts of the ComfyUI folders are meant to be immutable (i.e. the code), and unexpected behavior can occur if these files get overwritten and fall out of sync with the image after an update. It's also a security decision: the less data malicious custom node packs can persistently modify, the easier they are to contain. This is why I start by persisting the minimum possible, though I concede this comes at the cost of some convenience. Maybe users would prefer to have everything mutable inside a single mountable "/data" folders? |
20be04f to
d343a7f
Compare
Sure, it's Ubuntu 24.04.3 LTS. I have my best GPU in that machine because Linux offers a very customable environment for developing. I also have another computer which has Windows 11 and a NVIDIA GPU in, so let me check if ComfyUI works on it. |
|
Trying to build using podman on RHEL9. I got an error trying to build the dockerfile due to permissions on requirements.txt. I had to switch to root, chown it and switch back: This would probably be cleaner to add all of the files as root, and then chown them all to comfyui. And... Also, on FIPS enabled system, this line will cause an issue in the requirements.txt file. The newest versions have an issue with fips. If you set this to 14.2.0 or 14.1.0 I believe it should work. |
|
Hi @icsy7867, thanks for the feedback. Podman and non-BuildKit builds aren’t part of my goals, but I’ll see what I can do. After a few tweaks, I managed to build the image using both Podman and the legacy builder.
Could you please pull the latest changes and try again? If the error persists, could you share the full error message?
This shouldn’t happen given the
Unless this issue occurs specifically inside the Docker image, addressing it would be outside the scope of this PR. It might be better to open an issue in the tracker or raise it on Discord. I’m not familiar with FIPS, and I’d prefer not to make changes that affect the main developers' code or dependencies. |
Fair enough. But FIPS breaking will prevent this from running on anything enterprise. But perhaps that should be a different PR. Same thing here. Basically using AV < 15.0.0 should work fine. Ill try and pull and rebuild soon! |
|
This PR has been open for a few months now, and seems stable at least on NVIDIA setups. @comfyanonymous Would you consider merging it, or is there anything else still needed? |
|
@bbergeron0 |
|
To be honest, I haven’t heard anything from any member of the ComfyUI team—neither here, on Matrix, nor on Discord. I’ve set the PR aside lately because of the holiday season and because my GPU needs repair, but I must admit I’m growing eager for this PR to move forward. I don’t have an answer to your question, and I don’t think it will go anywhere without first catching the attention of the ComfyUI team, which I no longer know how to reach. The best way to support this PR would be to find a ComfyUI member interested in looking into it. If anyone knows someone in their leadership, please let me know. |
|
for nvidia cuda130, it seems that the pytorch install doesn't pull from |
Test Evidence CheckIf this PR changes user-facing behavior, visual proof (screen recording or screenshot) is required. PRs without applicable visual documentation may not be reviewed until provided. You can add it by:
|
Description
Introduce a Docker stack to run ComfyUI inside a container. This PR attempts to keep everything minimal, documented, and easy to maintain. I'm also committed to provide maintenance support regarding the Docker stack,
and I've added my name to CODEOWNER to assist in future PR touching the Docker stack(it look likes CODEOWNERS was purged upstream to only include the two project admins, so I'll let the owners suggest how I can help them instead).Features
Anti-Features
These are things this PR will not introduce unless explicitly requested by code owners. These anti-features are listed to keep the Docker stack minimal and unopinionated:
TL;DR: This is Docker support and nothing more, with minimal maintenance costs. Users who want more from ComfyUI should look at the alternative projects listed at the end.
Motivation
While ComfyUI does well in terms of security and monitoring, we cannot catch everything, and the last line of defense should be to avoid running arbitrary software like custom node packs on host machines, hence why I propose offering a Docker image.
Furthermore, the need for an official ComfyUI Docker image (or at least some form of Docker compatibility) has been expressed multiple times, as evidenced by various issues and discussions. This demand is further demonstrated by other forks, repositories, and pull requests with similar goals to this one.
Known issues
Testing
HELP NEEDED: I don't have AMD hardware to test this image, so if anyone could assist with testing on AMD systems, I am willing to integrate AMD support before merging. Also, I only have one SD-capable computer, so contributions for broader testing would be appreciated.
Please read the "Running with Docker" section in README.md before testing. When commenting, please mention:
Tested
I've been daily-driving this setup since before that PR so I can attest that all the ComfyUI features (at least those that I've used so far) are operational.
Alternatives
Pull Requests
This PR competes with three others that I know of:
Projects
Other projects that combine ComfyUI and Docker: