Skip to content

Commit

Permalink
[ci] switch to manylinux_2_28 for Linux artifacts (fixes #5514, fixes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb authored Nov 21, 2022
1 parent f1d3181 commit 61ef3ad
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 19 deletions.
32 changes: 23 additions & 9 deletions .ci/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ if [[ $OS_NAME == "macos" ]]; then
sudo xcode-select -s /Applications/Xcode_10.3.app/Contents/Developer || exit -1
fi
else # gcc
sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer || exit -1
if [[ $TASK != "mpi" ]]; then
brew install gcc
fi
Expand Down Expand Up @@ -60,20 +61,33 @@ else # Linux
sudo update-locale
fi
if [[ $TASK == "mpi" ]]; then
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
libopenmpi-dev \
openmpi-bin
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; then
sudo apt-get update
sudo apt-get install --no-install-recommends -y \
libopenmpi-dev \
openmpi-bin
else # in manylinux image
sudo yum update -y
sudo yum install -y \
openmpi-devel \
|| exit -1
fi
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
if [[ $IN_UBUNTU_LATEST_CONTAINER == "true" ]]; 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 \
pocl-opencl-icd
else # in manylinux image
sudo yum update -y
sudo yum install -y \
boost-devel \
ocl-icd-devel \
opencl-headers \
|| exit -1
fi
fi
if [[ $TASK == "cuda" || $TASK == "cuda_exp" ]]; then
Expand Down
7 changes: 4 additions & 3 deletions .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
resources:
containers:
- container: ubuntu1404
image: lightgbm/vsts-agent:ubuntu-14.04
- container: linux-artifact-builder
image: lightgbm/vsts-agent:manylinux_2_28_x86_64-dev
- container: ubuntu-latest
image: 'ubuntu:20.04'
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
Expand All @@ -35,7 +35,7 @@ jobs:
OS_NAME: 'linux'
PRODUCES_ARTIFACTS: 'true'
pool: sh-ubuntu
container: ubuntu1404
container: linux-artifact-builder
strategy:
matrix:
regular:
Expand All @@ -62,6 +62,7 @@ jobs:
- script: |
echo "##vso[task.setvariable variable=BUILD_DIRECTORY]$BUILD_SOURCESDIRECTORY"
echo "##vso[task.setvariable variable=LGB_VER]$(head -n 1 VERSION.txt)"
echo "##vso[task.prependpath]/usr/lib64/openmpi/bin"
echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Set variables'
- script: |
Expand Down
2 changes: 1 addition & 1 deletion docs/Installation-Guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ On Linux LightGBM can be built using **CMake** and **gcc** or **Clang**.
cmake ..
make -j4
**Note**: glibc >= 2.14 is required.
**Note**: glibc >= 2.28 is required.

**Note**: In some rare cases you may need to install OpenMP runtime library separately (use your package manager and search for ``lib[g|i]omp`` for doing this).

Expand Down
8 changes: 4 additions & 4 deletions helpers/check_dynamic_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ def check_dependicies(objdump_string: str) -> None:
assert len(versions) > 1
for major, minor in versions:
assert int(major) <= 2
assert int(minor) <= 14
assert int(minor) <= 28

GLIBCXX_version = re.compile(r'0{16}[ \t]+GLIBCXX_(\d{1,2})[.](\d{1,2})[.]?(\d{,3})[ \t]+')
versions = GLIBCXX_version.findall(objdump_string)
assert len(versions) > 1
for major, minor, patch in versions:
assert int(major) == 3
assert int(minor) == 4
assert patch == '' or int(patch) <= 19
assert patch == '' or int(patch) <= 22

GOMP_version = re.compile(r'0{16}[ \t]+G?OMP_(\d{1,2})[.](\d{1,2})[.]?\d{,3}[ \t]+')
versions = GOMP_version.findall(objdump_string)
assert len(versions) > 1
for major, minor in versions:
assert int(major) == 1
assert int(minor) == 0
assert int(major) <= 4
assert int(minor) <= 5


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions python-package/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Compiled library that is included in the wheel file supports both **GPU** and **

For **Windows** users, `VC runtime <https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads>`_ is needed if **Visual Studio** (2015 or newer) is not installed.

For **Linux** users, **glibc** >= 2.14 is required. Also, in some rare cases, when you hit ``OSError: libgomp.so.1: cannot open shared object file: No such file or directory`` error during importing LightGBM, you need to install OpenMP runtime library separately (use your package manager and search for ``lib[g|i]omp`` for doing this).
For **Linux** users, **glibc** >= 2.14 is required for LightGBM ``<=3.3.3`` and **glibc** >= 2.28 is required for newer versions. Also, in some rare cases, when you hit ``OSError: libgomp.so.1: cannot open shared object file: No such file or directory`` error during importing LightGBM, you need to install OpenMP runtime library separately (use your package manager and search for ``lib[g|i]omp`` for doing this).

For **macOS** (we provide wheels for 3 newest macOS versions) users:

Expand All @@ -45,7 +45,7 @@ Build from Sources
For **Linux** and **macOS** users, installation from sources requires installed `CMake`_.

For **Linux** users, **glibc** >= 2.14 is required. Also, in some rare cases you may need to install OpenMP runtime library separately (use your package manager and search for ``lib[g|i]omp`` for doing this).
For **Linux** users, **glibc** >= 2.28 is required. Also, in some rare cases you may need to install OpenMP runtime library separately (use your package manager and search for ``lib[g|i]omp`` for doing this).

For **macOS** users, you can perform installation either with **Apple Clang** or **gcc**.

Expand Down

0 comments on commit 61ef3ad

Please sign in to comment.