Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +1 -13
Dockerfile
CHANGED
@@ -28,19 +28,7 @@ RUN apt-get update && apt-get install -y \
|
|
28 |
RUN mkdir -p /tmp/uploads /tmp/results /tmp/huggingface/transformers /tmp/huggingface/datasets /tmp/.u2net \
|
29 |
&& chmod -R 777 /tmp/uploads /tmp/results /tmp/huggingface /tmp/.u2net
|
30 |
|
31 |
-
|
32 |
-
RUN pip install --no-cache-dir huggingface_hub==0.23.0
|
33 |
-
|
34 |
-
# Pre-download models with error handling
|
35 |
-
RUN if [ -z "$HF_TOKEN" ]; then \
|
36 |
-
echo "ERROR: HF_TOKEN is not set. Model pre-download will fail."; \
|
37 |
-
exit 1; \
|
38 |
-
else \
|
39 |
-
python -c "from huggingface_hub import login, snapshot_download; login(token='$HF_TOKEN'); \
|
40 |
-
snapshot_download(repo_id='Intel/dpt-large', cache_dir='/tmp/huggingface', token='$HF_TOKEN')" && \
|
41 |
-
python -c "from huggingface_hub import snapshot_download; \
|
42 |
-
snapshot_download(repo_id='depth-anything/Depth-Anything-V2-Tiny-hf', cache_dir='/tmp/huggingface', token='$HF_TOKEN')"; \
|
43 |
-
fi
|
44 |
|
45 |
# Copy requirements file and install dependencies
|
46 |
COPY requirements.txt .
|
|
|
28 |
RUN mkdir -p /tmp/uploads /tmp/results /tmp/huggingface/transformers /tmp/huggingface/datasets /tmp/.u2net \
|
29 |
&& chmod -R 777 /tmp/uploads /tmp/results /tmp/huggingface /tmp/.u2net
|
30 |
|
31 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
# Copy requirements file and install dependencies
|
34 |
COPY requirements.txt .
|