Skip to content

Commit 78f6b57

Browse files
authored
Download ios-onnxruntime from github instead of huggingface. (k2-fsa#593)
1 parent 43be4fa commit 78f6b57

File tree

1 file changed

+10
-26
lines changed

1 file changed

+10
-26
lines changed

build-ios.sh

+10-26
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,20 @@ dir=build-ios
66
mkdir -p $dir
77
cd $dir
88
onnxruntime_version=1.16.3
9-
10-
if [ ! -f ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a ]; then
11-
if [ ! -d ios-onnxruntime ]; then
12-
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/csukuangfj/ios-onnxruntime
13-
fi
14-
15-
pushd ios-onnxruntime
16-
git pull
17-
9+
onnxruntime_dir=ios-onnxruntime/$onnxruntime_version
10+
11+
if [ ! -f $onnxruntime_dir/onnxruntime.xcframework/ios-arm64/onnxruntime.a ]; then
12+
mkdir -p $onnxruntime_dir
13+
pushd $onnxruntime_dir
14+
rm -f onnxruntime.xcframework-${onnxruntime_version}.tar.bz2
15+
wget https://github.com/csukuangfj/onnxruntime-libs/releases/download/v${onnxruntime_version}/onnxruntime.xcframework-${onnxruntime_version}.tar.bz2
16+
tar xvf onnxruntime.xcframework-${onnxruntime_version}.tar.bz2
17+
rm onnxruntime.xcframework-${onnxruntime_version}.tar.bz2
18+
cd ..
1819
ln -sf $onnxruntime_version/onnxruntime.xcframework .
19-
git lfs pull --include $onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a
20-
git lfs pull --include $onnxruntime_version/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a
2120
popd
2221
fi
2322

24-
# check filesize
25-
filesize=$(ls -l ./ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a | tr -s " " " " | cut -d " " -f 5)
26-
if (( $filesize < 1000 )); then
27-
ls -lh ./ios-onnxruntime/onnxruntime.xcframework/ios-arm64/onnxruntime.a
28-
echo "Please use: git lfs pull to download ./ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64/onnxruntime.a"
29-
exit 1
30-
fi
31-
32-
filesize=$(ls -l ./ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a | tr -s " " " " | cut -d " " -f 5)
33-
if (( $filesize < 1000 )); then
34-
ls -lh ./ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a
35-
echo "Please use: git lfs pull to download ./ios-onnxruntime/$onnxruntime_version/onnxruntime.xcframework/ios-arm64_x86_64-simulator/onnxruntime.a"
36-
exit 1
37-
fi
38-
3923
# First, for simulator
4024
echo "Building for simulator (x86_64)"
4125

0 commit comments

Comments
 (0)