Update Dockerfile
Browse files- Dockerfile +24 -28
Dockerfile
CHANGED
|
@@ -1,52 +1,45 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
# Avoid interactive prompts during package installation
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
-
# Install
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
-
python3 \
|
| 9 |
-
python3-pip \
|
| 10 |
-
python3-dev \
|
| 11 |
git \
|
| 12 |
-
gcc \
|
| 13 |
-
g++ \
|
| 14 |
libsndfile1 \
|
| 15 |
ffmpeg \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
-
# Set Python alias (Ubuntu 24.04 ships Python 3.12)
|
| 19 |
-
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
| 20 |
-
|
| 21 |
# Allow pip to install packages system-wide in the container (PEP 668)
|
| 22 |
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 23 |
|
| 24 |
# Set working directory
|
| 25 |
WORKDIR /app
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
-
torch==2.8.0 \
|
| 30 |
-
torchaudio==2.8.0 \
|
| 31 |
-
--index-url https://download.pytorch.org/whl/cu128
|
| 32 |
-
|
| 33 |
-
# Install core dependencies
|
| 34 |
-
RUN pip install --no-cache-dir \
|
| 35 |
-
transformers==4.51.0 \
|
| 36 |
-
accelerate \
|
| 37 |
-
huggingface-hub \
|
| 38 |
-
soundfile
|
| 39 |
-
|
| 40 |
-
# Install common eval dependencies
|
| 41 |
-
# Pin datasets to 2.19.0 to avoid torchcodec dependency in newer versions
|
| 42 |
RUN pip install --no-cache-dir \
|
|
|
|
| 43 |
evaluate \
|
| 44 |
datasets==2.19.0 \
|
| 45 |
-
librosa \
|
| 46 |
jiwer \
|
| 47 |
-
packaging \
|
| 48 |
num2words \
|
| 49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
# Force soundfile backend for datasets audio decoding
|
| 52 |
ENV HF_AUDIO_DECODER_BACKEND=soundfile
|
|
@@ -54,6 +47,9 @@ ENV HF_AUDIO_DECODER_BACKEND=soundfile
|
|
| 54 |
# Copy the full repository
|
| 55 |
COPY . /app
|
| 56 |
|
|
|
|
|
|
|
|
|
|
| 57 |
# Default entrypoint
|
| 58 |
ENTRYPOINT ["bash"]
|
| 59 |
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
|
| 3 |
# Avoid interactive prompts during package installation
|
| 4 |
ENV DEBIAN_FRONTEND=noninteractive
|
| 5 |
|
| 6 |
+
# Install system dependencies for audio I/O
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
|
|
|
|
|
| 8 |
git \
|
|
|
|
|
|
|
| 9 |
libsndfile1 \
|
| 10 |
ffmpeg \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Allow pip to install packages system-wide in the container (PEP 668)
|
| 14 |
ENV PIP_BREAK_SYSTEM_PACKAGES=1
|
| 15 |
|
| 16 |
# Set working directory
|
| 17 |
WORKDIR /app
|
| 18 |
|
| 19 |
+
# ββ Core eval dependencies ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 20 |
+
# pin datasets to 2.19.0 to avoid torchcodec dependency
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
RUN pip install --no-cache-dir \
|
| 22 |
+
transformers \
|
| 23 |
evaluate \
|
| 24 |
datasets==2.19.0 \
|
|
|
|
| 25 |
jiwer \
|
|
|
|
| 26 |
num2words \
|
| 27 |
+
regex \
|
| 28 |
+
soundfile \
|
| 29 |
+
librosa \
|
| 30 |
+
requests \
|
| 31 |
+
tqdm \
|
| 32 |
+
python-dotenv
|
| 33 |
+
|
| 34 |
+
# ββ Provider-specific SDKs ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 35 |
+
RUN pip install --no-cache-dir \
|
| 36 |
+
openai \
|
| 37 |
+
assemblyai \
|
| 38 |
+
elevenlabs \
|
| 39 |
+
rev_ai \
|
| 40 |
+
speechmatics-python \
|
| 41 |
+
httpx \
|
| 42 |
+
requests-toolbelt
|
| 43 |
|
| 44 |
# Force soundfile backend for datasets audio decoding
|
| 45 |
ENV HF_AUDIO_DECODER_BACKEND=soundfile
|
|
|
|
| 47 |
# Copy the full repository
|
| 48 |
COPY . /app
|
| 49 |
|
| 50 |
+
# Default working directory for running API eval scripts
|
| 51 |
+
WORKDIR /app/api
|
| 52 |
+
|
| 53 |
# Default entrypoint
|
| 54 |
ENTRYPOINT ["bash"]
|
| 55 |
|