idiouf's picture
Upload 18 files
c95174b verified
Raw History Blame Contribute Delete
1.7 kB
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
CONSERVATION_HD_CACHE=/tmp/conservation_hd_cache \
CONSERVATION_HD_THEME=dark
WORKDIR /app
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
# Downloaded datasets are cached here; /tmp is writable on Hugging Face Spaces.
RUN mkdir -p /tmp/conservation_hd_cache
EXPOSE 7860
HEALTHCHECK CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:7860/_stcore/health')"
# Both palettes, so light and dark both render correctly and the reader can
# switch from the ⋮ menu at any time. Passed as flags so the repo stays flat.
#
# Do NOT add a top-level --theme.<key> flag here: a single one collapses the two
# palettes into one fixed custom theme and the switch disappears. --theme.base is
# likewise ignored once per-mode keys are present.
#
# Which palette a first-time reader gets is not something Streamlit exposes, so
# CONSERVATION_HD_THEME=dark makes app.py seed that choice once, on a first visit
# only. Set it to `auto` to follow the reader's browser instead.
CMD ["streamlit", "run", "app.py", \
"--server.address=0.0.0.0", "--server.port=7860", \
"--server.headless=true", "--browser.gatherUsageStats=false", \
"--theme.light.backgroundColor=#F2F6FA", \
"--theme.light.secondaryBackgroundColor=#FFFFFF", \
"--theme.light.textColor=#0F2439", \
"--theme.light.primaryColor=#1668CE", \
"--theme.dark.backgroundColor=#070F1A", \
"--theme.dark.secondaryBackgroundColor=#0D1E30", \
"--theme.dark.textColor=#F2F7FC", \
"--theme.dark.primaryColor=#4A9BFF"]