Spaces:
Running
Running
# syntax=docker/dockerfile:1 | |
FROM python:3.10-slim | |
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \ | |
PYTHONDONTWRITEBYTECODE=1 \ | |
PYTHONUNBUFFERED=1 | |
# System deps (minimal) | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential git curl && \ | |
rm -rf /var/lib/apt/lists/* | |
WORKDIR /app | |
COPY requirements.txt /app/ | |
RUN pip install --upgrade pip && \ | |
pip install -r requirements.txt | |
# Copy source | |
COPY . /app | |
# Streamlit in Spaces binds to 0.0.0.0:7860 | |
EXPOSE 7860 | |
# Streamlit avoids opening browser by default in container | |
CMD ["streamlit", "run", "frontend.py", "--server.port=7860", "--server.address=0.0.0.0"] | |