Signlink / Dockerfile.cloudrun
gaurannggg7's picture
feat: add Dockerfile.cloudrun optimized for GCP Cloud Run
8ff4b0a
Raw
History Blame Contribute Delete
690 Bytes
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