2023-06-11 05:46:25 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
|
|
|
brew install protobuf
|
|
|
|
|
fi
|
2023-08-30 10:45:05 +00:00
|
|
|
|
2023-11-26 08:37:12 +00:00
|
|
|
install_protobuf_centos() {
|
|
|
|
|
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
|
|
|
|
|
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
|
|
|
|
|
unzip protoc-3.15.8-linux-x86_64.zip -d /usr
|
|
|
|
|
rm protoc-3.15.8-linux-x86_64.zip
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-30 10:45:05 +00:00
|
|
|
if [[ "$OSTYPE" == "linux"* ]]; then
|
2023-11-26 08:37:12 +00:00
|
|
|
if command -v apt-get ; then
|
|
|
|
|
sudo apt-get -y install protobuf-compiler libopenblas-dev
|
|
|
|
|
else
|
|
|
|
|
# Build from manylinux2014 container
|
2023-12-10 12:23:02 +00:00
|
|
|
yum -y install openblas-devel perl-IPC-Cmd unzip curl openssl-devel
|
2023-11-26 08:37:12 +00:00
|
|
|
|
|
|
|
|
# Disable safe directory in docker
|
|
|
|
|
git config --system --add safe.directory "*"
|
|
|
|
|
|
|
|
|
|
install_protobuf_centos
|
|
|
|
|
fi
|
2023-08-30 10:45:05 +00:00
|
|
|
fi
|