Spaces:
Sleeping
Sleeping
File size: 561 Bytes
bbd8cd3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | FROM python:3.11-slim
# Install ffmpeg (needed for audio format conversion)
RUN apt-get update && apt-get install -y ffmpeg && rm -rf /var/lib/apt/lists/*
# HF Spaces requires a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Install Python dependencies
RUN pip install --no-cache-dir fastapi uvicorn numpy scipy python-multipart
# Copy application code
COPY --chown=user app/ ./app/
# HF Spaces uses port 7860
EXPOSE 7860
CMD ["uvicorn", "app.server:app", "--host", "0.0.0.0", "--port", "7860"]
|