Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 1679ff7

Browse files
authored
Add a retry to the Swift download in the Dockerfile (#590)
* Add a retry to the Swift download in the Dockerfile. * Attempting to recover via a manual check of the curl return code. * Add semicolons.
1 parent 6ddca08 commit 1679ff7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docker/Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ ARG swift_tf_url=https://storage.googleapis.com/swift-tensorflow-artifacts/night
55

66
# Download and extract S4TF
77
WORKDIR /swift-tensorflow-toolchain
8-
RUN curl -fSsL $swift_tf_url -o swift.tar.gz \
9-
&& mkdir usr \
8+
RUN if ! curl -fSsL --retry 5 $swift_tf_url -o swift.tar.gz; \
9+
then curl -fSsL --retry 5 $swift_tf_url -o swift.tar.gz; \
10+
fi;
11+
12+
RUN mkdir usr \
1013
&& tar -xzf swift.tar.gz --directory=usr --strip-components=1 \
1114
&& rm swift.tar.gz
1215
ENV PATH="/swift-tensorflow-toolchain/usr/bin:${PATH}"

0 commit comments

Comments
 (0)