23 lines
640 B
Docker
23 lines
640 B
Docker
FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
|
|
|
|
WORKDIR /app
|
|
|
|
# Install system dependencies
|
|
# ffmpeg is required for audio processing
|
|
# python3 and pip are required since we are using a base cuda image
|
|
RUN apt-get update && \
|
|
apt-get install -y ffmpeg python3 python3-pip && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Python dependencies
|
|
# We install dependencies globally as this is a container
|
|
# Install audio-separator with GPU support
|
|
RUN pip3 install --no-cache-dir fastapi uvicorn[standard] audio-separator[gpu] python-multipart
|
|
|
|
# Copy the server script
|
|
COPY scripts/server.py .
|
|
|
|
EXPOSE 24801
|
|
|
|
CMD ["python3", "server.py"]
|