File size: 478 Bytes
a622ce1
 
5addfd4
a46fa33
5addfd4
a622ce1
a46fa33
 
 
 
 
 
 
5885cbc
a622ce1
a46fa33
a622ce1
5addfd4
a622ce1
5addfd4
a46fa33
a622ce1
7a864b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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"]