Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -13
Dockerfile
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
-
|
|
|
3 |
|
4 |
# Set environment variables for Python and Numba
|
5 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
@@ -12,7 +13,7 @@ WORKDIR /app
|
|
12 |
# Copy the requirements file into the container at /app
|
13 |
COPY requirements.txt /app/
|
14 |
|
15 |
-
# Install build dependencies and LLVM components from Debian's default repos
|
16 |
RUN apt-get update && \
|
17 |
apt-get install -y --no-install-recommends \
|
18 |
build-essential \
|
@@ -26,25 +27,23 @@ RUN apt-get update && \
|
|
26 |
ffmpeg \
|
27 |
libsndfile1 \
|
28 |
libsndfile1-dev \
|
29 |
-
#
|
30 |
-
# Let's try clang-14 as it's common for Bookworm.
|
31 |
clang-14 \
|
32 |
llvm-14-dev \
|
33 |
-
llvm-
|
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
|
40 |
-
#
|
41 |
-
#
|
42 |
-
#
|
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.
|
47 |
-
numba==0.
|
48 |
resampy==0.3.1 \
|
49 |
librosa==0.9.2
|
50 |
|
|
|
1 |
# Use an official Python runtime as a parent image
|
2 |
+
# This base image is Debian 12 "Bookworm"
|
3 |
+
FROM python:3.9-slim
|
4 |
|
5 |
# Set environment variables for Python and Numba
|
6 |
ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
|
13 |
# Copy the requirements file into the container at /app
|
14 |
COPY requirements.txt /app/
|
15 |
|
16 |
+
# Install build dependencies and LLVM components from Debian's default repos (Bookworm)
|
17 |
RUN apt-get update && \
|
18 |
apt-get install -y --no-install-recommends \
|
19 |
build-essential \
|
|
|
27 |
ffmpeg \
|
28 |
libsndfile1 \
|
29 |
libsndfile1-dev \
|
30 |
+
# Install LLVM 14, which is common in Debian Bookworm
|
|
|
31 |
clang-14 \
|
32 |
llvm-14-dev \
|
33 |
+
llvm-14-runtime \
|
34 |
&& rm -rf /var/lib/apt/lists/*
|
35 |
|
36 |
+
# Set LLVM_CONFIG for clang-14 (needed by llvmlite)
|
37 |
ENV LLVM_CONFIG=/usr/bin/llvm-config-14
|
38 |
|
39 |
+
# Explicitly install compatible versions of core audio/Numba stack
|
40 |
+
# These versions are compatible with Python 3.9 and LLVM 14 (from clang-14)
|
41 |
+
# Numba 0.56.0 works with llvmlite 0.39.0
|
42 |
+
# Librosa 0.9.x generally works with resampy 0.3.x
|
|
|
43 |
RUN pip install --no-cache-dir \
|
44 |
numpy==1.22.4 \
|
45 |
+
llvmlite==0.39.0 \
|
46 |
+
numba==0.56.0 \
|
47 |
resampy==0.3.1 \
|
48 |
librosa==0.9.2
|
49 |
|