|
1 | 1 | #!/bin/bash
|
2 | 2 | set -eux -o pipefail
|
3 | 3 |
|
4 |
| -# This script is used to prepare the Docker container for aarch64_ci_wheel_build.py python script |
5 |
| -# as we need to install conda and setup the python version for the build. |
6 |
| - |
7 |
| -CONDA_PYTHON_EXE=/opt/conda/bin/python |
8 |
| -CONDA_EXE=/opt/conda/bin/conda |
9 |
| -PATH=/opt/conda/bin:$PATH |
10 |
| -LD_LIBRARY_PATH=/opt/conda/lib:$LD_LIBRARY_PATH |
11 |
| - |
12 |
| -############################################################################### |
13 |
| -# Install OS dependent packages |
14 |
| -############################################################################### |
15 |
| -yum -y install epel-release |
16 |
| -yum -y install less zstd libgomp |
17 |
| - |
18 |
| -############################################################################### |
19 |
| -# Install conda |
20 |
| -# disable SSL_verify due to getting "Could not find a suitable TLS CA certificate bundle, invalid path" |
21 |
| -# when using Python version, less than the conda latest |
22 |
| -############################################################################### |
23 |
| -echo 'Installing conda-forge' |
24 |
| -curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh |
25 |
| -chmod +x /mambaforge.sh |
26 |
| -/mambaforge.sh -b -p /opt/conda |
27 |
| -rm /mambaforge.sh |
28 |
| -/opt/conda/bin/conda config --set ssl_verify False |
29 |
| -/opt/conda/bin/conda install -y -c conda-forge python=${DESIRED_PYTHON} numpy pyyaml setuptools patchelf pygit2 openblas |
30 |
| -python --version |
31 |
| -conda --version |
32 |
| - |
33 |
| -############################################################################### |
34 |
| -# Exec libglfortran.a hack |
35 |
| -# |
36 |
| -# libgfortran.a from quay.io/pypa/manylinux2014_aarch64 is not compiled with -fPIC. |
37 |
| -# This causes __stack_chk_guard@@GLIBC_2.17 on pytorch build. To solve, get |
38 |
| -# ubuntu's libgfortran.a which is compiled with -fPIC |
39 |
| -############################################################################### |
40 |
| -cd ~/ |
41 |
| -curl -L -o ~/libgfortran-10-dev.deb http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-10/libgfortran-10-dev_10.5.0-1ubuntu1_arm64.deb |
42 |
| -ar x ~/libgfortran-10-dev.deb |
43 |
| -tar --use-compress-program=unzstd -xvf data.tar.zst -C ~/ |
44 |
| -cp -f ~/usr/lib/gcc/aarch64-linux-gnu/10/libgfortran.a /opt/rh/devtoolset-10/root/usr/lib/gcc/aarch64-redhat-linux/10/ |
| 4 | +SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" |
| 5 | +source $SCRIPTPATH/aarch64_ci_setup.sh |
45 | 6 |
|
46 | 7 | ###############################################################################
|
47 | 8 | # Run aarch64 builder python
|
|
0 commit comments