FROM pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime WORKDIR /app RUN apt-get update && apt-get install -y \ ffmpeg \ libsndfile1 \ && rm -rf /var/lib/apt/lists/* COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir fastapi uvicorn python-multipart ENV TRANSFORMERS_CACHE=/app/model_cache ENV HF_HOME=/app/model_cache COPY app.py api.py ./ RUN mkdir -p /app/model_cache CMD ["python", "api.py"] EXPOSE 8000