Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Containerized execution hangs because of update checks #175

Open
jason-weirather opened this issue Sep 8, 2024 · 5 comments
Open

Containerized execution hangs because of update checks #175

jason-weirather opened this issue Sep 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@jason-weirather
Copy link

Describe the bug
While executing comfy-cli in a docker container, execution hangs when the code calls comfy_cli.update's check_for_updates function.

To Reproduce

  1. Install comfy-cli in a docker container
  2. Disable tracking in comfy-cli since its intended to run in a container without phoning out
  3. Use comfy launch to spin up a server in the background (--listen in the args should be set to 0.0.0.0 in docker)

Expected behavior
Upon running comfy launch the server should start up and run, indicating a background server is up and return to a prompt.

Additional context
I have succeeded to get comfy-cli to work in a container by modifying the code to not check for updates in commands that have nothing to do with updating.

My Dockerfile that does succeed with the modified comfy-cli

https://github.com/jason-weirather/comfyui-image-api/commits/main/Dockerfile

My branch of the fork where I've gotten it working by removing a few calls checking for updates from the comfy launch and comfy env commands.

https://github.com/jason-weirather/comfy-cli/tree/fixhangbug/comfy_cli

@robinjhuang
Copy link
Member

Can you share the error message you see? Does it halt the comfy launch?

@jason-weirather
Copy link
Author

Can you share the error message you see? Does it halt the comfy launch?

Theres no error message. It just hangs and halts the launch if it cannot reach out to talk to pypi.

@robinjhuang
Copy link
Member

robinjhuang commented Sep 13, 2024 via email

@jason-weirather
Copy link
Author

How about we make the request timeout 3 seconds

I think it sounds great solution to the hang bug. Should I make a PR request that implements this?

In the future, I think it would be good to add a command line option for an offline mode that could save that time and skip bonking pypi. A few seconds if you are spinning up dockers as like a lambda function thing is still not great, but thats something I could raise in a feature request rather than bug fix.

@robinjhuang
Copy link
Member

robinjhuang commented Sep 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants