Fangjun Kuang
Committed by GitHub

Download ios-onnxruntime from github instead of huggingface. (#593)

正在显示 1 个修改的文件 包含 10 行增加26 行删除
@@ -6,36 +6,20 @@ dir=build-ios @@ -6,36 +6,20 @@ dir=build-ios
6 mkdir -p $dir 6 mkdir -p $dir
7 cd $dir 7 cd $dir
8 onnxruntime_version=1.16.3 8 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 ..
18 ln -sf $onnxruntime_version/onnxruntime.xcframework . 19 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  
21 popd 20 popd
22 fi 21 fi
23 22
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 -  
39 # First, for simulator 23 # First, for simulator
40 echo "Building for simulator (x86_64)" 24 echo "Building for simulator (x86_64)"
41 25