Skip to content

Commit e5566f9

Browse files
authored
Add HF Hub timeout defaults to Dockerfile (#1699)
Defaults are 10s which causes issues on slow networks or large model downloads.
1 parent e794fbe commit e5566f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Dockerfile.cuda

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ RUN rm /app/.venv/bin/python3.12 && ln -s /usr/local/bin/python /app/.venv/bin/p
9797
# Place executables in the environment at the front of the path
9898
ENV PATH="/app/.venv/bin:$PATH"
9999

100+
# HuggingFace Hub timeouts (defaults are 10s which causes issues on slow networks)
101+
ENV HF_HUB_ETAG_TIMEOUT=500
102+
ENV HF_HUB_DOWNLOAD_TIMEOUT=300
103+
100104
# Use entrypoint for setup (ulimit, etc) but default to sleep infinity for K8s
101105
ENTRYPOINT ["/app/docker-entrypoint.sh"]
102106
CMD ["sleep", "infinity"]

0 commit comments

Comments
 (0)