blair-johnson commited on
Commit
a46fa33
·
verified ·
1 Parent(s): bef4262

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -4
Dockerfile CHANGED
@@ -1,16 +1,23 @@
1
  FROM python:3.12-slim
2
 
3
  RUN useradd -m -u 1000 user
 
4
  WORKDIR /app
5
 
6
- COPY --chown=user ./requirements.txt requirements.txt
7
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
 
 
8
 
9
- COPY --chown=user . /app
10
 
11
  USER user
12
 
13
  ENV HOME=/home/user \
14
- PATH=/home/user/.local/bin:$PATH
15
 
16
  CMD ["python", "app.py", "--server-name", "0.0.0.0", "--server-port", "7860"]
 
1
  FROM python:3.12-slim
2
 
3
  RUN useradd -m -u 1000 user
4
+
5
  WORKDIR /app
6
 
7
+ COPY requirements.txt requirements.txt
8
+
9
+ RUN pip install --no-cache-dir -r requirements.txt && \
10
+ pip install --no-cache-dir huggingface_hub
11
+
12
+ ARG HF_TOKEN
13
+ RUN --mount=type=secret,id=HF_TOKEN \
14
+ huggingface-cli download "depth-anything/Depth-Anything-V2-Large-hf" --token $HF_TOKEN
15
 
16
+ COPY --chown=user . .
17
 
18
  USER user
19
 
20
  ENV HOME=/home/user \
21
+ PATH=/home/user/.local/bin:$PATH
22
 
23
  CMD ["python", "app.py", "--server-name", "0.0.0.0", "--server-port", "7860"]