Skip to content

Commit

Permalink
sh runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
Peeeeanut committed Jul 12, 2024
1 parent d6cce71 commit 8b3d8b1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions 24-07/caffe/shell/caffe-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e # 在遇到非零返回值时立即退出

start=$(date +%s)

echo "step1: 安装依赖包"
# 如果当前用户没有sudo权限,则注释掉下面两行,改用root用户来运行下面两行
sudo dnf install -y leveldb-devel snappy-devel opencv.aarch64 boost-devel hdf5-devel gflags-devel glog-devel lmdb-devel openblas.aarch64
Expand Down Expand Up @@ -58,3 +60,7 @@ echo "export CAFFE=$CAFFE" >> ~/.bashrc
echo "export PATH=$PATH" >> ~/.bashrc
source ~/.bashrc
caffe --version || { echo "Caffe build failed"; exit 1; }

end=$(date +%s)
runtime=$((end-start))
echo "脚本执行时长: $runtime s"
6 changes: 6 additions & 0 deletions 24-07/caffe/shell/caffe-riscv64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e # 在遇到非零返回值时立即退出

start=$(date +%s)

echo "step1: 安装依赖包"
sudo dnf install -y leveldb-devel snappy-devel opencv.riscv64 boost-devel hdf5-devel gflags-devel glog-devel lmdb-devel openblas.riscv64 protobuf-devel.riscv64
sudo dnf install -y git wget tar gcc-c++ unzip automake libtool autoconf
Expand Down Expand Up @@ -34,3 +36,7 @@ echo "export CAFFE=$CAFFE" >> ~/.bashrc
echo "export PATH=$PATH" >> ~/.bashrc
source ~/.bashrc
caffe --version || { echo "Caffe build failed"; exit 1; }

end=$(date +%s)
runtime=$((end-start))
echo "脚本执行时长: $runtime s"
6 changes: 6 additions & 0 deletions 24-07/caffe/shell/caffe-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -e

start=$(date +%s)

# 下载deploy文件到caffe-deploy文件夹
mkdir caffe-deploy; cd caffe-deploy
wget https://github.com/6eanut/NOTEBOOK/raw/main/24-07/caffe/deploy/deploy.zip
Expand Down Expand Up @@ -67,3 +69,7 @@ do
echo ""$file"测试完成"
fi
done

end=$(date +%s)
runtime=$((end-start))
echo "脚本执行时长: $runtime s"

0 comments on commit 8b3d8b1

Please sign in to comment.