image-to-relief / Dockerfile
blair-johnson's picture
Update Dockerfile
7a864b4 verified
raw
history blame contribute delete
491 Bytes
FROM python:3.12-slim
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir huggingface_hub
ARG HF_TOKEN
RUN --mount=type=secret,id=HF_TOKEN \
huggingface-cli download "depth-anything/Depth-Anything-V2-Large-hf" --token $(cat /run/secrets/HF_TOKEN)
COPY --chown=user . .
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
CMD ["python", "app.py"]