Skip to content

Commit bc22d0b

Browse files
committed
aarch64: cd: upgrade to manylinux 2_28 and remove conda dependency
1 parent ef4a28a commit bc22d0b

File tree

2 files changed

+44
-28
lines changed

2 files changed

+44
-28
lines changed

Diff for: aarch64_linux/aarch64_ci_setup.sh

+41-26
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,50 @@
22
set -eux -o pipefail
33

44
# 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-
CONDA_ENV_NAME=aarch64_env
10-
PATH=/opt/conda/bin:$PATH
11-
LD_LIBRARY_PATH=/opt/conda/envs/${CONDA_ENV_NAME}/lib/:/opt/conda/lib:$LD_LIBRARY_PATH
12-
13-
###############################################################################
14-
# Install conda
15-
# disable SSL_verify due to getting "Could not find a suitable TLS CA certificate bundle, invalid path"
16-
# when using Python version, less than the conda latest
17-
###############################################################################
18-
echo 'Installing conda-forge'
19-
curl -L -o /mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
20-
chmod +x /mambaforge.sh
21-
/mambaforge.sh -b -p /opt/conda
22-
rm /mambaforge.sh
23-
source /opt/conda/etc/profile.d/conda.sh
24-
conda config --set ssl_verify False
25-
conda create -y -c conda-forge -n "${CONDA_ENV_NAME}" python=${DESIRED_PYTHON}
26-
conda activate "${CONDA_ENV_NAME}"
5+
# as we need to setup the required python version and install few tools.
276

7+
dnf update
8+
dnf install -y epel-release
9+
dnf install -y gcc openssl-devel bzip2-devel libffi-devel zlib-devel wget make
10+
11+
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
12+
sudo dnf install python38
13+
elif [[ "$DESIRED_PYTHON" == "3.9" ]]; then
14+
sudo dnf install python39
15+
elif [[ "$DESIRED_PYTHON" == "3.10" ]]; then
16+
wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz
17+
tar xzf Python-3.10.14.tgz
18+
cd Python-3.10.14
19+
./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions
20+
make -j 8
21+
make altinstall
22+
cd ..
23+
rm Python-3.10.14.tgz
24+
elif [[ "$DESIRED_PYTHON" == "3.11" ]]; then
25+
wget https://www.python.org/ftp/python/3.11.9/Python-3.11.9.tgz
26+
tar xzf Python-3.11.9.tgz
27+
cd Python-3.11.9
28+
./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions
29+
make -j 8
30+
make altinstall
31+
cd ..
32+
rm Python-3.11.9.tgz
33+
else
34+
echo "unsupported python version passed. use 3.8, 3.9, 3.10 or 3.11"
35+
fi
36+
37+
/usr/local/bin/python$DESIRED_PYTHON -m venv appenv
38+
39+
source appenv/bin/activate
40+
41+
python3 --version
42+
43+
yum install -y python3-devel python3-pip openblas-openmp
44+
45+
pip3 install dataclasses typing-extensions scons pyyaml pygit2 pyyaml ninja patchelf
46+
pip3 install Cython
2847
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
2948
pip install -q numpy==1.24.4
3049
else
3150
pip install -q --pre numpy==2.0.0rc1
3251
fi
33-
conda install -y -c conda-forge pyyaml==6.0.1 patchelf==0.17.2 pygit2==1.13.2 openblas==0.3.25=*openmp* ninja==1.11.1 scons==4.5.2
34-
35-
python --version
36-
conda --version

Diff for: aarch64_linux/aarch64_wheel_ci_build.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def build_ArmComputeLibrary() -> None:
2727
os.makedirs(acl_install_dir)
2828
check_call(["git", "clone", "https://github.com/ARM-software/ComputeLibrary.git", "-b", "v23.08",
2929
"--depth", "1", "--shallow-submodules"])
30-
check_call(["scons", "Werror=1", "-j8", f"build_dir=/{acl_install_dir}/build"] + acl_build_flags,
30+
check_call(["scons", "Werror=0", "-j8", f"build_dir=/{acl_install_dir}/build"] + acl_build_flags,
3131
cwd=acl_checkout_dir)
3232
for d in ["arm_compute", "include", "utils", "support", "src"]:
3333
shutil.copytree(f"{acl_checkout_dir}/{d}", f"{acl_install_dir}/{d}")
@@ -102,7 +102,8 @@ def parse_arguments():
102102
"ACL_ROOT_DIR=/acl " \
103103
"LD_LIBRARY_PATH=/pytorch/build/lib:/acl/build:$LD_LIBRARY_PATH " \
104104
"ACL_INCLUDE_DIR=/acl/build " \
105-
"ACL_LIBRARY=/acl/build "
105+
"ACL_LIBRARY=/acl/build " \
106+
"BUILD_TEST=0"
106107
else:
107108
print("build pytorch without mkldnn backend")
108109

0 commit comments

Comments
 (0)