Spaces:
Running
Running
File size: 584 Bytes
0673086 c7be834 0673086 c7be834 0673086 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
DEVICE=cpu \
PIP_NO_CACHE_DIR=1 \
HF_HOME=/home/user/.cache/huggingface \
HF_HUB_DISABLE_TELEMETRY=1 \
DO_NOT_TRACK=1
RUN useradd --create-home --uid 1000 user
WORKDIR /app
RUN pip install --no-cache-dir torch==2.9.1 torchvision==0.24.1 --index-url https://download.pytorch.org/whl/cpu
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
COPY --chown=user:user . /app
USER user
ENV HOME=/home/user
EXPOSE 7860
CMD ["bash", "start.sh"]
|