video_stream / Dockerfile
zmbfeng's picture
try to get cuda working
3643d0b
Raw
History Blame Contribute Delete
633 Bytes
# Use an official Ubuntu as a parent image
#FROM ubuntu:20.04
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
# Set environment variables to avoid user interaction when installing packages
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
python3-pip \
python3-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN apt-get install -y ffmpeg
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]