Spaces:
Sleeping
Sleeping
File size: 755 Bytes
411cb60 5b939ff a49f59f 411cb60 5b939ff 411cb60 a49f59f 411cb60 5b939ff 411cb60 5b939ff 411cb60 5b939ff 411cb60 5b939ff 411cb60 | 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 | # 1. Base Image
FROM python:3.10-slim
# 2. Set working directory
WORKDIR /app
# 3. Install system dependencies
# UPDATED: Added 'libsndfile1' which is required for Audio Processing (Librosa)
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# 4. Create a non-root user (Hugging Face requirement)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# 5. Copy files with permissions
COPY --chown=user . .
# 6. Install Python Dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# 7. Expose Port
EXPOSE 7860
# 8. Run App
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |