Skip to content

Commit ba62132

Browse files
committed
aarch64: cd: remove conda dependency
1 parent 87cdc8c commit ba62132

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

aarch64_linux/aarch64_ci_setup.sh

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,36 @@
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.
5+
# as we need to setup the required python version and install few tools.
6+
if [ "$DESIRED_PYTHON" == "3.8" ] || [ "$DESIRED_PYTHON" == "3.9" ] || [ "$DESIRED_PYTHON" == "3.11" ]; then
7+
dnf install -y python$DESIRED_PYTHON
68

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
9+
elif [ "$DESIRED_PYTHON" == "3.10" ] || [ "$DESIRED_PYTHON" == "3.12" ]; then
10+
if [ "$DESIRED_PYTHON" == "3.10" ]; then
11+
PYTHON_INSTALLED_VERSION="3.10.14"
12+
else
13+
PYTHON_INSTALLED_VERSION="3.12.3"
14+
fi
15+
wget https://www.python.org/ftp/python/${PYTHON_INSTALLED_VERSION}/Python-${PYTHON_INSTALLED_VERSION}.tgz
16+
tar xzf Python-${PYTHON_INSTALLED_VERSION}.tgz
17+
cd Python-${PYTHON_INSTALLED_VERSION}
18+
./configure --with-system-ffi --with-computed-gotos --enable-loadable-sqlite-extensions
19+
make -j 8
20+
make altinstall
21+
cd ..
22+
rm Python-${PYTHON_INSTALLED_VERSION}.tgz
23+
else
24+
echo "unsupported python version passed. 3.8, 3.9, 3.10 or 3.11 are the only supported versions"
25+
exit 1
26+
fi
1227

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}"
28+
/usr/local/bin/python${DESIRED_PYTHON} -m venv appenv${DESIRED_PYTHON}
29+
source appenv${DESIRED_PYTHON}/bin/activate
30+
python3 --version
2731

32+
python3 -m pip install dataclasses typing-extensions scons pyyaml pygit2 ninja patchelf Cython
2833
if [[ "$DESIRED_PYTHON" == "3.8" ]]; then
29-
pip install -q numpy==1.24.4
34+
python3 -m pip install -q numpy==1.24.4
3035
else
31-
pip install -q --pre numpy==2.0.0rc1
36+
python3 -m pip install -q --pre numpy==2.0.0rc1
3237
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

0 commit comments

Comments
 (0)