1
1
# syntax=docker/dockerfile:1
2
+
2
3
FROM nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04
4
+
3
5
EXPOSE 7865
4
6
WORKDIR /app
5
7
COPY . .
8
+
6
9
# Install dependencies to add PPAs
7
10
RUN apt-get update && \
8
11
apt-get install -y -qq ffmpeg aria2 && apt clean && \
9
12
apt-get install -y software-properties-common && \
10
13
apt-get clean && \
11
14
rm -rf /var/lib/apt/lists/*
15
+
12
16
# Add the deadsnakes PPA to get Python 3.10
13
17
RUN add-apt-repository -y ppa:deadsnakes/ppa
18
+
14
19
# Install Python 3.10 and pip
15
20
RUN apt-get update && \
16
21
apt-get install -y build-essential python-dev python3-dev python3.10-distutils python3.10-dev python3.10 python3.10-venv curl && \
17
22
apt-get clean && \
18
23
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
19
24
curl https://bootstrap.pypa.io/get-pip.py | python3.10
25
+
20
26
# Set Python 3.10 as the default
21
27
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1
28
+
22
29
RUN python3 -m pip install --upgrade pip==24.0
23
- # Install main requirements
24
30
RUN python3 -m pip install --no-cache-dir -r requirements.txt
25
31
26
- # Create a virtual environment for audio-separator with different librosa version
27
- RUN python3 -m venv /app/venv_separator
28
- # Install audio-separator in the virtual environment
29
- RUN /app/venv_separator/bin/pip install --upgrade pip && \
30
- /app/venv_separator/bin/pip install onnxruntime-gpu audio-separator==0.30.0
31
-
32
- # Create a simple wrapper script for audio-separator
33
- RUN echo '#!/bin/bash\n /app/venv_separator/bin/audio-separator "$@"' > /usr/local/bin/audio-separator && \
34
- chmod +x /usr/local/bin/audio-separator
35
-
36
-
37
32
RUN chmod +x /app/scripts/start.sh
38
33
VOLUME [ "/app/opt" ]
39
34
CMD ["/app/scripts/start.sh" ]
0 commit comments