| FROM python:3.9-slim | |
| RUN apt-get update && apt-get install -y libsndfile1 ffmpeg | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| RUN mkdir -p /tmp/transformers_cache /tmp/hf_home /tmp/torch_home && \ | |
| chmod 777 /tmp/transformers_cache /tmp/hf_home /tmp/torch_home | |
| ENV TRANSFORMERS_CACHE=/tmp/transformers_cache | |
| ENV HF_HOME=/tmp/hf_home | |
| ENV TORCH_HOME=/tmp/torch_home | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |