FROM python:3.9-slim # Create and set cache directory ENV TRANSFORMERS_CACHE=/app/cache RUN mkdir -p ${TRANSFORMERS_CACHE} && chmod 777 ${TRANSFORMERS_CACHE} WORKDIR /app COPY requirements.txt . # Install packages RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 8000 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]