FROM python:3.10-slim | |
# Install ffmpeg and libsndfile1 for audio decoding | |
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 | |
# Create writable cache directory | |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache | |
ENV HF_HOME=/app/cache | |
WORKDIR /app | |
COPY requirements.txt . | |
RUN pip install -r requirements.txt | |
COPY main.py . | |
EXPOSE 7860 | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |