FROM python:3.10-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # 👇 Create custom cache directory with proper permissions RUN mkdir -p /app/cache # 👇 Set TRANSFORMERS_CACHE permanently ENV TRANSFORMERS_CACHE=/app/cache COPY llm_service.py . EXPOSE 7860 CMD ["uvicorn", "llm_service:app", "--host", "0.0.0.0", "--port", "7860"]