File size: 1,468 Bytes
c0421ae 9598146 c0421ae 9598146 c0421ae c736d55 c0421ae c736d55 cfe3143 c736d55 1cba062 c0421ae 9598146 cfe3143 9598146 c736d55 9598146 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | FROM python:3.12-slim
# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies for audio I/O
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Allow pip to install packages system-wide in the container (PEP 668)
ENV PIP_BREAK_SYSTEM_PACKAGES=1
# Set working directory
WORKDIR /app
# ββ Core eval dependencies ββββββββββββββββββββββββββββββββββββββββββββββββββββ
# pin datasets to 2.19.0 to avoid torchcodec dependency
RUN pip install --no-cache-dir \
transformers \
evaluate \
datasets==2.19.0 \
jiwer \
num2words \
regex \
soundfile \
librosa \
requests \
tqdm \
python-dotenv
# ββ Provider-specific SDKs ββββββββββββββββββββββββββββββββββββββββββββββββββββ
RUN pip install --no-cache-dir \
openai \
assemblyai \
elevenlabs \
rev_ai \
speechmatics-python \
httpx \
requests-toolbelt
# Force soundfile backend for datasets audio decoding
ENV HF_AUDIO_DECODER_BACKEND=soundfile
# Copy the full repository
COPY . /app
# Default entrypoint
ENTRYPOINT ["bash"]
EXPOSE 7860
CMD ["-c", "python3 -m http.server 7860"]
|