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 \ hf 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"]