Spaces:
Sleeping
Sleeping
File size: 659 Bytes
5516b13 1f25e74 5516b13 1f25e74 5516b13 1f25e74 5516b13 1f25e74 5516b13 d399729 5516b13 1f25e74 5516b13 1f25e74 5516b13 1f25e74 5516b13 | 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 | # Use official Python image
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Setup user for Hugging Face (Required ID 1000)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Copy and install requirements
COPY --chown=user requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy all application code (src, config, app, etc.)
COPY --chown=user . .
# Set port
ENV PORT=7860
EXPOSE 7860
# Command to run API
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|