Created
April 8, 2025 03:35
-
-
Save rodja/09d0a4ec9b5fface739b669157ec8337 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM zauberzeug/nicegui:2.13.0 | |
COPY main.py . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from nicegui import ui | |
if __name__ in {"__main__", "__mp_main__"}: | |
# os.environ["UVICORN_WORKERS"] = "1" | |
# os.environ["OMP_NUM_THREADS"] = "1" | |
ui.label('test') | |
ui.run( | |
reload=False, | |
native=False, | |
uvicorn_logging_level='warning', | |
show=False, # prevents chromium injection | |
port=8080 | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker build -t issue_4521 . | |
docker run --rm -it -p 8080:8080 --memory=512m --cpus=1 issue_4521 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment