Skip to content

Instantly share code, notes, and snippets.

@rodja
Created April 8, 2025 03:35
Show Gist options
  • Save rodja/09d0a4ec9b5fface739b669157ec8337 to your computer and use it in GitHub Desktop.
Save rodja/09d0a4ec9b5fface739b669157ec8337 to your computer and use it in GitHub Desktop.
FROM zauberzeug/nicegui:2.13.0
COPY main.py .
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
)
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