Spaces:
Build error
Build error
File size: 690 Bytes
3b627eb b82aa95 3b627eb b82aa95 3b627eb b82aa95 3b627eb b82aa95 3b627eb | 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 | FROM python:3.12-slim
# System dependencies for faster-whisper (ctranslate2) and audio/image processing
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
ffmpeg \
libsndfile1 \
libgl1 \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user (required by HF Spaces)
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /home/user/app
# Install Python dependencies and the app itself
COPY --chown=user . .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir .
# Expose Gradio port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]
|