|
FROM nvidia/cuda:12.0.1-runtime-ubuntu22.04 |
|
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1 |
|
ENV PYTHONUNBUFFERED=1 |
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \ |
|
python3 \ |
|
python3-pip \ |
|
python3-dev \ |
|
ffmpeg \ |
|
libsm6 \ |
|
libxext6 \ |
|
libxrender-dev \ |
|
libglib2.0-0 \ |
|
git \ |
|
&& apt-get clean \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip3 install --no-cache-dir -r requirements.txt |
|
RUN pip3 install aiohttp |
|
|
|
|
|
RUN pip3 install --no-cache-dir torch torchvision torchaudio |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN mkdir -p /app/assets |
|
|
|
|
|
EXPOSE 8080 |
|
|
|
|
|
CMD ["python3", "server.py", "--host", "0.0.0.0", "--port", "8080"] |