Spaces:
Running
Running
Update dockerfile
Browse files- dockerfile +18 -3
dockerfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
-
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
git \
|
6 |
git-lfs \
|
@@ -12,13 +12,28 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
libgl1-mesa-glx \
|
13 |
portaudio19-dev \
|
14 |
python3-pyaudio \
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
&& rm -rf /var/lib/apt/lists/* \
|
17 |
&& git lfs install
|
18 |
|
19 |
# Set working directory
|
20 |
WORKDIR /app
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Copy requirements and install Python dependencies
|
23 |
COPY requirements.txt .
|
24 |
RUN pip install --no-cache-dir pip -U && \
|
@@ -31,4 +46,4 @@ COPY . .
|
|
31 |
EXPOSE 7860
|
32 |
|
33 |
# Command to run the application
|
34 |
-
CMD ["python", "app.py"]
|
|
|
1 |
FROM python:3.10-slim
|
2 |
|
3 |
+
# Install system dependencies
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
git \
|
6 |
git-lfs \
|
|
|
12 |
libgl1-mesa-glx \
|
13 |
portaudio19-dev \
|
14 |
python3-pyaudio \
|
15 |
+
python3-all-dev \
|
16 |
+
pkg-config \
|
17 |
+
libasound2-dev \
|
18 |
+
libportaudio2 \
|
19 |
+
libportaudiocpp0 \
|
20 |
&& rm -rf /var/lib/apt/lists/* \
|
21 |
&& git lfs install
|
22 |
|
23 |
# Set working directory
|
24 |
WORKDIR /app
|
25 |
|
26 |
+
# Install portaudio from source
|
27 |
+
RUN wget http://files.portaudio.com/archives/pa_stable_v190700_20210406.tgz \
|
28 |
+
&& tar -zxvf pa_stable_v190700_20210406.tgz \
|
29 |
+
&& cd portaudio \
|
30 |
+
&& ./configure \
|
31 |
+
&& make \
|
32 |
+
&& make install \
|
33 |
+
&& cd .. \
|
34 |
+
&& rm -rf portaudio pa_stable_v190700_20210406.tgz \
|
35 |
+
&& ldconfig
|
36 |
+
|
37 |
# Copy requirements and install Python dependencies
|
38 |
COPY requirements.txt .
|
39 |
RUN pip install --no-cache-dir pip -U && \
|
|
|
46 |
EXPOSE 7860
|
47 |
|
48 |
# Command to run the application
|
49 |
+
CMD ["python", "app.py"]
|