fpl-predictor / Dockerfile
allenborochin's picture
Upload 4 files
c137b9d verified
Raw History Blame Contribute Delete
937 Bytes
FROM python:3.11-slim
# System deps
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user (HF requires this)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
ENV HF_HOME=/home/user/.cache/huggingface
WORKDIR /app
# Install Python deps
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Copy app code
COPY --chown=user app.py .
# Streamlit listens on 8501
EXPOSE 8501
# Healthcheck so HF knows the app is up
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Run Streamlit
ENTRYPOINT ["streamlit", "run", "app.py", \
"--server.port=8501", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--browser.gatherUsageStats=false"]