Spaces:
Paused

live-view / Dockerfile
GitHub Actions Bot
Sync from GitHub main branch
2c60621
Raw History Blame Contribute Delete
739 Bytes
# Use a slim Python image and install ffmpeg via apt
FROM python:3.11-slim
# keep Python output unbuffered
ENV PYTHONUNBUFFERED=1
# install ffmpeg and clean up apt cache to keep image small
RUN apt-get update && \
apt-get install -y --no-install-recommends ffmpeg curl && \
rm -rf /var/lib/apt/lists/*
# create app user for non-root runtime
RUN useradd --create-home --shell /bin/bash appuser
WORKDIR /app
# copy dependency file and install Python deps
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# copy application code
COPY . /app
# expose default uvicorn port
EXPOSE 7860
# run uvicorn; use a single worker (tune for your 2 vCPU instance)
CMD ["python", "main.py"]