FROM python:3.11-slim ENV PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ HF_HOME=/tmp/huggingface \ TRANSFORMERS_CACHE=/tmp/huggingface \ HOME=/tmp \ PORT=7860 WORKDIR /app COPY requirements.txt . RUN python -m pip install --no-cache-dir --upgrade pip \ && python -m pip install --no-cache-dir --index-url https://download.pytorch.org/whl/cpu torch torchvision \ && python -m pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["python", "-u", "backend.py"]