onnxruntime/tools/ci_build/github/linux/docker/scripts/install_dotnet.sh
Changming Sun 264a7405e5
Cherry-picks for 1.16.1 release (#17741)
Cherry-pick the following PRs to the release branch:

Fix: Fail to skip disabledmodel in winml (#17728) 
Move dotnet build and test into docker in Linux CPU CI (#17417) 
Run Nuget_Test_Linux_GPU in container (#17452) 
Run Final_Jar_Testing_Linux_GPU in docker (#17533) 
TreeEnsemble speed up (#17449) 
Remove onnxruntime extensions from list of gitmodules (#17615) 
Include onnxruntime_float16.h in the package. (#17637) 
Fix static quantization for QDQ and Percentile distribution (#17649) 
[TensorRT EP] Back out the PerThreadContext (#17690) 
Update nodejs to 18.x (#17657) 
Update linux-wasm-ci.yml: remove the ln command (#17735)
2023-10-02 15:04:56 -07:00

24 lines
910 B
Bash
Executable file

#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set -e -x
if [ -f /etc/redhat-release ]; then
rpm -Uvh https://packages.microsoft.com/config/centos/7/packages-microsoft-prod.rpm
yum install -y dotnet-sdk-6.0
elif [ -f /etc/os-release ]; then
# Get Ubuntu version
declare repo_version=$(if command -v lsb_release &> /dev/null; then lsb_release -r -s; else grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"'; fi)
# Download Microsoft signing key and repository
wget https://packages.microsoft.com/config/ubuntu/$repo_version/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
# Install Microsoft signing key and repository
dpkg -i packages-microsoft-prod.deb
# Clean up
rm packages-microsoft-prod.deb
# Update packages
apt-get update && apt-get install -y dotnet-sdk-6.0
else
echo "Unsupported OS"
exit 1
fi