Skip to content

Commit

Permalink
[ci] Install graphviz system-widely (#4238)
Browse files Browse the repository at this point in the history
* 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
StrikerRUS authored Apr 29, 2021

Verified

This commit was signed with the committer’s verified signature.
Kikobeats Kiko Beats
1 parent f97aa86 commit 91f72e2
Showing 2 changed files with 22 additions and 15 deletions.
29 changes: 21 additions & 8 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ if [[ $OS_NAME == "macos" ]]; then
if [[ $TASK == "swig" ]]; then
brew install swig
fi
brew install graphviz
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
else # Linux
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
@@ -25,13 +26,10 @@ else # Linux
echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections

sudo apt-get update
sudo apt-get install -y --no-install-recommends \
sudo apt-get install --no-install-recommends -y \
software-properties-common

sudo add-apt-repository -y ppa:git-core/ppa
sudo apt-get update

sudo apt-get install -y --no-install-recommends \
sudo apt-get install --no-install-recommends -y \
apt-utils \
build-essential \
ca-certificates \
@@ -64,12 +62,16 @@ else # Linux
fi
if [[ $TASK == "mpi" ]]; then
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
if [[ $TASK == "gpu" ]]; then
sudo add-apt-repository ppa:mhier/libboost-latest -y
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
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
@@ -79,11 +81,13 @@ else # Linux
mv $AMDAPPSDK_PATH/lib/x86_64/sdk/* $AMDAPPSDK_PATH/lib/x86_64/
echo libamdocl64.so > $OPENCL_VENDOR_PATH/amdocl64.icd
fi
ARCH=$(uname -m)
if [[ $TASK == "cuda" ]]; then
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
apt-get update
apt-get install --no-install-recommends -y \
curl \
graphviz \
libxau6 \
libxext6 \
libxrender1 \
@@ -99,9 +103,18 @@ else # Linux
apt-get update
apt-get install --no-install-recommends -y \
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
if [[ $SETUP_CONDA != "false" ]]; then
ARCH=$(uname -m)
if [[ $ARCH == "x86_64" ]]; then
curl -sL -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
else
8 changes: 1 addition & 7 deletions .ci/test.sh
Original file line number Diff line number Diff line change
@@ -105,13 +105,7 @@ if [[ $TASK == "swig" ]]; then
fi

conda install -q -y -n $CONDA_ENV cloudpickle dask distributed joblib matplotlib numpy pandas psutil pytest scikit-learn scipy

# 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
pip install graphviz # python-graphviz from Anaconda is not allowed to be installed with Python 3.9

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)

0 comments on commit 91f72e2

Please sign in to comment.