Dockerisation de tout
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
FROM python:3.8-slim
|
||||
# Use amd64 platform for better Essentia compatibility, works with emulation on ARM
|
||||
FROM --platform=linux/amd64 python:3.9-slim
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
@@ -12,6 +13,16 @@ RUN apt-get update && apt-get install -y \
|
||||
liblapack-dev \
|
||||
pkg-config \
|
||||
curl \
|
||||
build-essential \
|
||||
libyaml-dev \
|
||||
libfftw3-dev \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
libswresample-dev \
|
||||
libsamplerate0-dev \
|
||||
libtag1-dev \
|
||||
libchromaprint-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set working directory
|
||||
@@ -24,20 +35,12 @@ RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
||||
COPY requirements.txt .
|
||||
|
||||
# Install Python dependencies in stages for better caching
|
||||
# Using versions compatible with Python 3.8
|
||||
RUN pip install --no-cache-dir numpy==1.23.5
|
||||
RUN pip install --no-cache-dir scipy==1.10.1
|
||||
# Using versions compatible with Python 3.9
|
||||
RUN pip install --no-cache-dir numpy==1.24.3
|
||||
RUN pip install --no-cache-dir scipy==1.11.4
|
||||
|
||||
# Install Essentia - Python 3.8 version (latest available with pre-built wheels)
|
||||
RUN ARCH=$(uname -m) && \
|
||||
if [ "$ARCH" = "x86_64" ]; then \
|
||||
echo "Installing Essentia for x86_64 Python 3.8..." && \
|
||||
pip install --no-cache-dir --trusted-host essentia.upf.edu \
|
||||
https://essentia.upf.edu/python-wheels/essentia-2.1b6.dev218-cp38-cp38-manylinux1_x86_64.whl || \
|
||||
echo "Essentia installation failed, using fallback mode"; \
|
||||
else \
|
||||
echo "Essentia wheels only available for x86_64, using fallback mode"; \
|
||||
fi
|
||||
# Install Essentia - Python 3.9 with ARM64 support
|
||||
RUN pip install --no-cache-dir essentia
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ mutagen==1.47.0
|
||||
# Essentia for genre/mood/instrument classification
|
||||
# Note: Essentia is installed separately in Dockerfile from official wheels
|
||||
|
||||
# Scientific Computing (versions compatible with Python 3.8)
|
||||
numpy==1.23.5
|
||||
scipy==1.10.1
|
||||
# Scientific Computing (versions compatible with Python 3.9)
|
||||
numpy==1.24.3
|
||||
scipy==1.11.4
|
||||
|
||||
# Configuration & Validation
|
||||
pydantic==2.5.3
|
||||
|
||||
Reference in New Issue
Block a user