Spaces:
Running on Zero
Running on Zero
File size: 598 Bytes
13b26d8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # Lightweight: no CUDA base and no ML dependencies. All generation happens in
# the inference Space; this container just serves the interface.
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# Spaces run as uid 1000 and only $HOME is writable.
RUN useradd -m -u 1000 app
USER app
ENV HOME=/home/app \
HF_HOME=/home/app/.cache/huggingface \
PATH=/home/app/.local/bin:$PATH
WORKDIR /home/app
COPY --chown=app requirements.txt .
RUN pip install --user --no-cache-dir -r requirements.txt
COPY --chown=app app.py ./
EXPOSE 7860
ENV PORT=7860
CMD ["python", "app.py"]
|