Spaces:
Sleeping
Sleeping
File size: 690 Bytes
8ff4b0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | FROM python:3.11-slim
WORKDIR /app
RUN apt-get update && apt-get install -y \
ffmpeg \
libgl1 \
libglib2.0-0 \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
# Replace opencv-python with headless variant (no display server in containers)
RUN grep -v '^opencv-python$' requirements.txt > /tmp/req_no_cv.txt \
&& pip install --no-cache-dir -r /tmp/req_no_cv.txt \
&& pip install --no-cache-dir opencv-python-headless
COPY . .
ENV PORT=8080
HEALTHCHECK CMD curl --fail http://localhost:${PORT}/_stcore/health || exit 1
CMD streamlit run app.py \
--server.port=${PORT} \
--server.address=0.0.0.0 \
--server.headless=true
|