-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·53 lines (38 loc) · 1.08 KB
/
build.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
#!/bin/bash
# Updating the package list
sudo apt-get update
# Installing G++
sudo apt-get install -y g++-9
# Setting G++ 11 as the default
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 200
sudo update-alternatives --set g++ /usr/bin/g++-9
if g++-9 --version; then
echo "G++ 11 installed successfully."
# Setting G++ 11 as the default with a higher priority
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100
# Selecting G++ 11 as the default
sudo update-alternatives --set g++ /usr/bin/g++-9
else
echo "Failed to install G++ 9."
exit 1
fi
# Installing CMake
sudo apt-get install -y cmake
# Installing Python 3 and pip
sudo apt-get install -y python3 python3-pip
# Installing pandas, seaborn, and IPython using pip
pip3 install pandas seaborn ipython
# Echoing the versions of the installed packages
echo "G++ version:"
g++ --version
echo "CMake version:"
cmake --version
echo "Python packages version:"
pip3 freeze | grep -E 'pandas|seaborn|ipython'
mkdir -p build
cd build
cmake ..
make -j
cp ramulator ..
pwd
cd ..