Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions eng/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/bin/sh

set -e

os="$(echo "$1" | tr "[:upper:]" "[:lower:]")"

if [ -z "$os" ]; then
. "$(dirname "$0")"/common/native/init-os-and-arch.sh
Comment thread
svick marked this conversation as resolved.
Resolved
fi

if [ "$os" = "linux" ]; then
if [ -e /etc/os-release ]; then
. /etc/os-release
fi

if [ "$ID" = "rhel" ] || [ "$ID" = "centos" ] || [ "$ID" = "azurelinux" ]; then
echo "warning: libomp was not installed automatically for $ID. Install it manually before building ML.NET." >&2
fi
fi

"$(dirname "$0")"/common/native/install-dependencies.sh "$os"

case "$os" in
Comment thread
svick marked this conversation as resolved.
Resolved
linux)
if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
Comment thread
svick marked this conversation as resolved.
Resolved
apt install -y libomp-dev
Comment thread
svick marked this conversation as resolved.
Resolved
elif [ "$ID" = "fedora" ]; then
dnf install -y libomp-devel
elif [ "$ID" = "amzn" ]; then
dnf install -y libomp-devel
elif [ "$ID" = "alpine" ]; then
apk add openmp-dev
fi
;;

osx|maccatalyst|ios|iossimulator|tvos|tvossimulator)
brew install libomp
brew link libomp --force
;;
esac
Loading