FROM python:3.10-slim # DejaVu font (GIF labels) + libGL-free OpenCV runtime libs RUN apt-get update && \ apt-get install -y --no-install-recommends fonts-dejavu-core libglib2.0-0 && \ rm -rf /var/lib/apt/lists/* WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r requirements.txt COPY . /app # Spaces run the container as a non-root user: the app writes its working # folders (cache/, results/, the downloaded dataset) under /app. RUN mkdir -p /app/cache /app/results /app/static && chmod -R 777 /app ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \ PYTHONUNBUFFERED=1 \ MPLCONFIGDIR=/tmp/mpl \ HF_HOME=/tmp/hf_home EXPOSE 7860 CMD ["streamlit", "run", "roundel_app_biventricular.py", "--server.port=7860", "--server.address=0.0.0.0"]