# Hugging Face Spaces: FastAPI + ASR (CPU-only) FROM python:3.10-slim # Install system deps RUN apt-get update && apt-get install -y \ ffmpeg libsndfile1 git curl build-essential && \ rm -rf /var/lib/apt/lists/* WORKDIR /code # Copy code COPY ./app /code/app # Create hf_cache and make it world-writable so the non-root runtime user can use it RUN mkdir -p /code/app/hf_cache \ && chmod -R a+rwX /code/app/hf_cache # Copy and install Python dependencies COPY requirements.txt ./ # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Expose default port for HF Spaces EXPOSE 7860 # Entrypoint for FastAPI app CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]