-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_mlpack.i686.sh
executable file
·54 lines (47 loc) · 1.34 KB
/
build_mlpack.i686.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
#
# Build mlpack's Python bindings inside the cibuildwheel environment for an i686
# package.
set -e -u -o pipefail
# RHEL7 on i686 does not have openblas-devel; so, we use atlas-devel instead.
# Armadillo and ensmallen must both be installed by hand.
yum install -y atlas-devel lapack-devel wget
pip install cython numpy pandas wheel setuptools
wget https://files.mlpack.org/armadillo-11.4.1.tar.gz
tar -xvzpf armadillo-11.4.1.tar.gz
cd armadillo-11.4.1/
cmake -DCMAKE_INSTALL_PREFIX=/usr .
make
make install
cd ../
rm -rf armadillo-11.4.1/ armadillo-11.4.1.tar.gz
# cereal must be installed by hand.
wget https://github.com/USCILab/cereal/archive/refs/tags/v1.3.2.tar.gz
tar -xvzpf v1.3.2.tar.gz
cd cereal-1.3.2/
cp -vr include/* /usr/include/
cd ../
rm -rf cereal-1.3.2 v1.3.2.tar.gz
wget https://www.ensmallen.org/files/ensmallen-2.19.0.tar.gz
tar -xvzpf ensmallen-2.19.0.tar.gz
cd ensmallen-2.19.0/
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_TESTS=OFF -DDEBUG=ON ../
make
make install
cd ../../
rm -rf ensmallen-2.19.0/ ensmallen-2.19.0.tar.gz
wget https://www.mlpack.org/files/stb.tar.gz
tar -xvzpf stb.tar.gz
rm -f stb.tar.gz
cd mlpack/
rm -rf build/
mkdir build/
cd build/
cmake \
-DBUILD_PYTHON_BINDINGS=ON \
-DBUILD_CLI_EXECUTABLES=OFF \
-DSTB_IMAGE_INCLUDE_DIR="$PWD/../../stb/include/" \
../
make