JefersonPMS's picture
Wildfire allocation decision-support dashboard
e7e46ae
Raw
History Blame Contribute Delete
983 Bytes
# Container image for the Andalusia wildfire-allocation app (Hugging Face Spaces / any container host).
# rasterio / pyogrio ship manylinux wheels that bundle GDAL, so no apt GDAL is needed.
FROM python:3.12-slim
# System libs occasionally needed by geospatial / matplotlib wheels at runtime.
RUN apt-get update && apt-get install -y --no-install-recommends \
libexpat1 libgl1 && \
rm -rf /var/lib/apt/lists/*
# Run as a non-root user (Hugging Face Spaces recommended pattern).
RUN useradd -m -u 1000 user
USER user
ENV PATH=/home/user/.local/bin:$PATH \
STREAMLIT_SERVER_HEADLESS=true
WORKDIR /app
COPY --chown=user requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# Hugging Face Spaces proxies to this port (7860 = HF default; also set as app_port in README).
EXPOSE 7860
CMD ["streamlit", "run", "app.py", \
"--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true"]