File size: 764 Bytes
3677501 1f854f5 3677501 1f854f5 3677501 | 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 | FROM python:3.10-slim
WORKDIR /app
# Install system dependencies including FFmpeg dev libs (required by av/demucs)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
git-lfs \
ffmpeg \
libavformat-dev \
libavcodec-dev \
libavdevice-dev \
libavutil-dev \
libavfilter-dev \
libswscale-dev \
libswresample-dev \
pkg-config \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
# Copy app files
COPY . .
# Create non-root user for HF Spaces
RUN useradd -m -u 1000 user
USER user
EXPOSE 7860
CMD ["python", "app.py"] |