Unverified Commit 91f72e2a authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[ci] Install graphviz system-widely (#4238)

* Install graphviz from default conda channel

* Update test.sh

* Update setup.sh

* Update test.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh
parent f97aa86e
...@@ -17,6 +17,7 @@ if [[ $OS_NAME == "macos" ]]; then ...@@ -17,6 +17,7 @@ if [[ $OS_NAME == "macos" ]]; then
if [[ $TASK == "swig" ]]; then if [[ $TASK == "swig" ]]; then
brew install swig brew install swig
fi fi
brew install graphviz
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else # Linux else # Linux
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
...@@ -25,13 +26,10 @@ else # Linux ...@@ -25,13 +26,10 @@ else # Linux
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections
sudo apt-get update sudo apt-get update
sudo apt-get install -y --no-install-recommends \ sudo apt-get install --no-install-recommends -y \
software-properties-common software-properties-common
sudo add-apt-repository -y ppa:git-core/ppa sudo apt-get install --no-install-recommends -y \
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
apt-utils \ apt-utils \
build-essential \ build-essential \
ca-certificates \ ca-certificates \
...@@ -64,12 +62,16 @@ else # Linux ...@@ -64,12 +62,16 @@ else # Linux
fi fi
if [[ $TASK == "mpi" ]]; then if [[ $TASK == "mpi" ]]; then
sudo apt-get update sudo apt-get update
sudo apt-get install --no-install-recommends -y libopenmpi-dev openmpi-bin sudo apt-get install --no-install-recommends -y \
libopenmpi-dev \
openmpi-bin
fi fi
if [[ $TASK == "gpu" ]]; then if [[ $TASK == "gpu" ]]; then
sudo add-apt-repository ppa:mhier/libboost-latest -y sudo add-apt-repository ppa:mhier/libboost-latest -y
sudo apt-get update sudo apt-get update
sudo apt-get install --no-install-recommends -y libboost1.74-dev ocl-icd-opencl-dev sudo apt-get install --no-install-recommends -y \
libboost1.74-dev \
ocl-icd-opencl-dev
cd $BUILD_DIRECTORY # to avoid permission errors cd $BUILD_DIRECTORY # to avoid permission errors
curl -sL -o AMD-APP-SDKInstaller.tar.bz2 https://github.com/microsoft/LightGBM/releases/download/v2.0.12/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2 curl -sL -o AMD-APP-SDKInstaller.tar.bz2 https://github.com/microsoft/LightGBM/releases/download/v2.0.12/AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
tar -xjf AMD-APP-SDKInstaller.tar.bz2 tar -xjf AMD-APP-SDKInstaller.tar.bz2
...@@ -79,11 +81,13 @@ else # Linux ...@@ -79,11 +81,13 @@ else # Linux
mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/ mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/
echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd
fi fi
ARCH=$(uname -m)
if [[ $TASK == "cuda" ]]; then if [[ $TASK == "cuda" ]]; then
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get update apt-get update
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
curl \ curl \
graphviz \
libxau6 \ libxau6 \
libxext6 \ libxext6 \
libxrender1 \ libxrender1 \
...@@ -99,9 +103,18 @@ else # Linux ...@@ -99,9 +103,18 @@ else # Linux
apt-get update apt-get update
apt-get install --no-install-recommends -y \ apt-get install --no-install-recommends -y \
cmake cmake
else
if [[ $ARCH != "x86_64" ]]; then
yum update -y
yum install -y \
graphviz
else
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
graphviz
fi
fi fi
if [[ $SETUP_CONDA != "false" ]]; then if [[ $SETUP_CONDA != "false" ]]; then
ARCH=$(uname -m)
if [[ $ARCH == "x86_64" ]]; then if [[ $ARCH == "x86_64" ]]; then
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
else else
......
...@@ -105,13 +105,7 @@ if [[ $TASK == "swig" ]]; then ...@@ -105,13 +105,7 @@ if [[ $TASK == "swig" ]]; then
fi fi
conda install -q -y -n $CONDA_ENV cloudpickle dask distributed joblib matplotlib numpy pandas psutil pytest scikit-learn scipy conda install -q -y -n $CONDA_ENV cloudpickle dask distributed joblib matplotlib numpy pandas psutil pytest scikit-learn scipy
pip install graphviz # python-graphviz from Anaconda is not allowed to be installed with Python 3.9
# graphviz must come from conda-forge to avoid this on some linux distros:
# https://github.com/conda-forge/graphviz-feedstock/issues/18
conda install -q -y \
-n $CONDA_ENV \
-c conda-forge \
python-graphviz
if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "clang" ]]; then if [[ $OS_NAME == "macos" ]] && [[ $COMPILER == "clang" ]]; then
# fix "OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized." (OpenMP library conflict due to conda's MKL) # fix "OMP: Error #15: Initializing libiomp5.dylib, but found libomp.dylib already initialized." (OpenMP library conflict due to conda's MKL)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment