File size: 653 Bytes
e748991
 
d2ed72d
32e5008
 
e748991
 
 
 
f6be1de
e748991
 
 
f6be1de
e748991
d2ed72d
e748991
effe894
 
 
e748991
d2ed72d
e748991
effe894
 
 
 
3395e3f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 

WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    ffmpeg \
    tk \
    python3-tk \
    python3-pip \
    && rm -rf /var/lib/apt/lists/*

RUN --mount=type=cache,target=/root/.cache \
    pip3 install "audio-separator[gpu]" fastapi uvicorn python-multipart ffmpeg-python pydantic youtube-transcript-api

COPY . /app

RUN mkdir -p tmp && \
    chown -R 1000:1000 tmp && \
    chmod -R 775 tmp

ENV NUMBA_CACHE_DIR=/tmp

RUN useradd --create-home --uid 1000 appuser
USER appuser

EXPOSE 7860
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]