Replies: 4 comments 1 reply
-
I briefly looked at it and could reproduce the behaviour. Strangely when I use the |
Beta Was this translation helpful? Give feedback.
-
I transferred it into an issue: #3066 |
Beta Was this translation helpful? Give feedback.
-
Thanks for converting this into an issue. It looks like using |
Beta Was this translation helpful? Give feedback.
-
Do you have a venv or deps in the same path level as the app? I had similar issue but it was related to uvicorn, not specific to Nicegui or even Fastapi Anyway, If someone steps by here what I have found is that using just As you have mentioned that you're using ui.run instead, if that's the same case you can use |
Beta Was this translation helpful? Give feedback.
-
Question
Hi folks:
I'm making productive use of NiceGUI and finding it very elegant to use. However, I've run into an issue when trying to deploy an app within a container.
I'm sure I'm doing something dumb here, and I'm hoping someone can point out what. Ideas welcome!
Problem
When I start a NiceGUI app within a container, it will use 100% of a CPU core. I've simplified my setup as far as I can in an attempt to narrow down what the issue could be, as follows:
Dockerfile
NiceGUI App:
nicegui-test.py
Build the Container Image
docker build -t nicegui-test .
Run the Container
This works, but uses a continuous 100% of a CPU core.
Run the NiceGUI App from Bash within a Container
I see the same issue if I start the NiceGUI app from a Bash shell within the container:
% docker run -it --rm -p 8080:8080 --name nicegui-run nicegui-test bash root@d589ccb0d5d3:/# python nicegui-test.py NiceGUI ready to go on http://localhost:8080, and http://172.17.0.2:8080
The CPU will latch at 100% once the app is started.
Thanks for any pointers, folks.
Stack Trace
Edit: added stack trace when the app is interrupted:
Beta Was this translation helpful? Give feedback.
All reactions