Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +48 -23
Dockerfile
CHANGED
@@ -12,30 +12,55 @@ WORKDIR /app
|
|
12 |
# Copy the requirements file into the container at /app
|
13 |
COPY requirements.txt /app/
|
14 |
|
15 |
-
#
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
#
|
37 |
-
RUN apt-get update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
ENV LLVM_CONFIG=/usr/bin/llvm-config-9
|
|
|
|
|
39 |
|
40 |
# Explicitly install compatible versions of core audio/Numba stack
|
41 |
# Order matters: numpy -> llvmlite -> numba -> resampy -> librosa
|
|
|
12 |
# Copy the requirements file into the container at /app
|
13 |
COPY requirements.txt /app/
|
14 |
|
15 |
+
# --- START LLVM INSTALLATION FIX ---
|
16 |
+
# Add Debian's oldstable repository to ensure access to llvm-9-dev if it's considered "older"
|
17 |
+
# for the default slim image's sources.
|
18 |
+
# This ensures we can find packages that might not be in the primary/current stable sources.
|
19 |
+
# It's important to use the correct release name for oldstable (e.g., bullseye, buster).
|
20 |
+
# For Python 3.9-slim (Debian 11 Bullseye), bullseye is the current stable, so llvm-9-dev should be there.
|
21 |
+
# Let's ensure the regular apt sources are exhaustive.
|
22 |
+
|
23 |
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
24 |
+
lsb-release \
|
25 |
+
wget \
|
26 |
+
gnupg2 \
|
27 |
+
software-properties-common \
|
28 |
+
&& rm -rf /var/lib/apt/lists/*
|
29 |
+
|
30 |
+
# Add LLVM's official APT repository for a wider range of LLVM versions
|
31 |
+
# This is generally more reliable for specific LLVM versions.
|
32 |
+
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
|
33 |
+
RUN echo "deb http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-9 main" >> /etc/apt/sources.list.d/llvm.list \
|
34 |
+
&& echo "deb-src http://apt.llvm.org/bullseye/ llvm-toolchain-bullseye-9 main" >> /etc/apt/sources.list.d/llvm.list
|
35 |
+
|
36 |
+
# Update apt cache again to include the new LLVM repository
|
37 |
+
RUN apt-get update
|
38 |
+
|
39 |
+
# Install specific LLVM 9 development packages
|
40 |
+
RUN apt-get install -y --no-install-recommends \
|
41 |
+
llvm-9-dev \
|
42 |
+
llvm-9 \
|
43 |
+
llvm-9-runtime \
|
44 |
+
clang-9 \
|
45 |
+
# Ensure standard build tools and audio libs are present
|
46 |
+
build-essential \
|
47 |
+
libedit-dev \
|
48 |
+
libffi-dev \
|
49 |
+
python3-dev \
|
50 |
+
libgl1-mesa-glx \
|
51 |
+
libsm6 \
|
52 |
+
libxrender1 \
|
53 |
+
libglib2.0-0 \
|
54 |
+
ffmpeg \
|
55 |
+
libsndfile1 \
|
56 |
+
libsndfile1-dev \
|
57 |
+
&& rm -rf /var/lib/apt/lists/*
|
58 |
+
|
59 |
+
# Set LLVM_CONFIG to the specific version's config script
|
60 |
+
# This is crucial for llvmlite to find the correct LLVM installation
|
61 |
ENV LLVM_CONFIG=/usr/bin/llvm-config-9
|
62 |
+
# --- END LLVM INSTALLATION FIX ---
|
63 |
+
|
64 |
|
65 |
# Explicitly install compatible versions of core audio/Numba stack
|
66 |
# Order matters: numpy -> llvmlite -> numba -> resampy -> librosa
|