FROM python:3.9-slim WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt COPY . /app ENV TRANSFORMERS_CACHE=/app/cache RUN mkdir -p /app/cache && chmod 777 /app/cache CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]