diffusiondb-sd15-lora / Dockerfile
whosouravsharma's picture
Wait out a sleeping backend with a status message; trace visitor IP and location to LangSmith
13b26d8 verified
Raw History Blame Contribute Delete
598 Bytes
# 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"]