File size: 571 Bytes
60b1e24 0c39d91 60b1e24 0c39d91 60b1e24 0c39d91 cd936ec 60b1e24 0c39d91 60b1e24 0c39d91 | 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 | FROM python:3.10-slim
WORKDIR /app
# Install system dependencies FIRST
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
# Install Python dependencies in CORRECT ORDER
# numpy MUST be first, before torch/torchaudio
RUN pip install --no-cache-dir "numpy>=1.24.0,<2.0.0"
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Expose port
EXPOSE 7860
# Run with proper Python settings
ENV PYTHONUNBUFFERED=1
CMD ["python", "app.py"] |