File size: 516 Bytes
3c9e0f6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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"]
|