FROM python:3.10-slim # System dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ libsndfile1 \ espeak-ng \ cmake \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Install llama-cpp-python (CPU only, no special flags for free tier) RUN pip install --no-cache-dir llama-cpp-python==0.3.9 # Copy application source COPY . . # Environment ENV HF_HOME=/tmp/hf_cache ENV PYTHONUNBUFFERED=1 EXPOSE 7860 CMD ["python", "app.py"]