Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +17 -19
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
-
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Set environment variables for Python and Numba
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
@@ -26,29 +26,27 @@ RUN apt-get update && \
|
|
| 26 |
ffmpeg \
|
| 27 |
libsndfile1 \
|
| 28 |
libsndfile1-dev \
|
| 29 |
-
#
|
| 30 |
-
# clang-
|
| 31 |
-
clang-
|
| 32 |
-
llvm-
|
| 33 |
-
llvm-
|
| 34 |
-
# Sometimes just 'llvm' and 'libllvm-9-ocaml-dev' or similar
|
| 35 |
-
# is what's needed, but let's be specific for 9.
|
| 36 |
-
# If llvm-9-dev still fails, then try just clang-9.
|
| 37 |
&& rm -rf /var/lib/apt/lists/*
|
| 38 |
|
| 39 |
-
# Set LLVM_CONFIG
|
| 40 |
-
|
| 41 |
-
ENV LLVM_CONFIG=/usr/bin/llvm-config-9
|
| 42 |
|
| 43 |
-
|
| 44 |
-
#
|
| 45 |
-
#
|
|
|
|
|
|
|
| 46 |
RUN pip install --no-cache-dir \
|
| 47 |
numpy==1.22.4 \
|
| 48 |
-
llvmlite==0.
|
| 49 |
-
numba==0.
|
| 50 |
-
resampy==0.
|
| 51 |
-
librosa==0.
|
| 52 |
|
| 53 |
# Install other Python dependencies from requirements.txt
|
| 54 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.9-slim # This is likely Debian 12 "Bookworm"
|
| 3 |
|
| 4 |
# Set environment variables for Python and Numba
|
| 5 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
|
| 26 |
ffmpeg \
|
| 27 |
libsndfile1 \
|
| 28 |
libsndfile1-dev \
|
| 29 |
+
# Bookworm typically has LLVM 14, 15, or 16
|
| 30 |
+
# Let's try clang-14 as it's common for Bookworm.
|
| 31 |
+
clang-14 \
|
| 32 |
+
llvm-14-dev \
|
| 33 |
+
llvm-11-runtime \
|
|
|
|
|
|
|
|
|
|
| 34 |
&& rm -rf /var/lib/apt/lists/*
|
| 35 |
|
| 36 |
+
# Set LLVM_CONFIG for clang-14
|
| 37 |
+
ENV LLVM_CONFIG=/usr/bin/llvm-config-14
|
|
|
|
| 38 |
|
| 39 |
+
# Explicitly install *newer* compatible versions of core audio/Numba stack
|
| 40 |
+
# This requires a bit of research for ideal Numba/llvmlite/Resampy compatibility
|
| 41 |
+
# with newer LLVM. Let's try a common, more recent pairing that generally works.
|
| 42 |
+
# Numba 0.55.0 works with llvmlite 0.38.0
|
| 43 |
+
# Librosa 0.9.2 uses resampy 0.3.1
|
| 44 |
RUN pip install --no-cache-dir \
|
| 45 |
numpy==1.22.4 \
|
| 46 |
+
llvmlite==0.38.0 \
|
| 47 |
+
numba==0.55.0 \
|
| 48 |
+
resampy==0.3.1 \
|
| 49 |
+
librosa==0.9.2
|
| 50 |
|
| 51 |
# Install other Python dependencies from requirements.txt
|
| 52 |
RUN pip install --no-cache-dir -r requirements.txt
|