FROM python:3.9-slim # Install system dependencies RUN apt-get update && apt-get install -y \ ffmpeg \ && rm -rf /var/lib/apt/lists/* # Set working directory WORKDIR /app # Set HF_HOME and create cache directory with permissive permissions ENV HF_HOME=/app/.cache/huggingface RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache/huggingface RUN touch transcription.log && chmod -R 777 transcription.log # Copy requirements first for better caching COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY app.py . # Expose port EXPOSE 7860 # Run the application with uvicorn CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]