FocusGuards-demo / Dockerfile
Kexin-251202's picture
first commit
2083506 verified
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies for OpenCV, aiortc, and FFmpeg
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
libxcb1 \
libgl1 \
ffmpeg \
libavcodec-dev \
libavformat-dev \
libavutil-dev \
libswscale-dev \
libavdevice-dev \
libopus-dev \
libvpx-dev \
libsrtp2-dev \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Install Node.js (LTS) and frontend deps in the final image
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get update \
&& apt-get install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN npm install
RUN npm run build
RUN mkdir -p /app/static && cp -R /app/dist/* /app/static/
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]