FROM python:3.10 # Set working directory WORKDIR /app # Copy local files COPY . . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Set Hugging Face cache directory to writable one ENV HF_HOME=/data RUN mkdir -p /data && chmod 777 /data # Expose the port EXPOSE 7860 # Run the FastAPI app with Uvicorn CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]