File size: 633 Bytes
f115683
3643d0b
 
f115683
 
 
 
 
 
 
6244233
 
 
 
 
 
f115683
6244233
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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"]