Created
February 11, 2020 04:12
-
-
Save fr1t2/39ab618cef3ad16e7a5833e87d0eeaf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# update and install packages | |
apt-get update | |
apt-get -y install swig3.0 python3-dev python3-pip build-essential pkg-config libssl-dev libffi-dev libhwloc-dev libboost-dev wget | |
## Add SWAP if not exist | |
## Define some variables | |
swapFile=/swapfile | |
swapSize=2G | |
# | |
## Check for SWAP... | |
if free | awk '/^Swap:/ {exit !$2}'; then | |
echo 'Swap exsists' | |
free -h |grep Swap | |
exit | |
else | |
sudo fallocate -l $swapSize $swapFile | |
sudo chmod 600 $swapFile | |
sudo mkswap $swapFile | |
sudo swapon $swapFile | |
sudo swapon --show | |
sudo cp /etc/fstab /etc/fstab.bak | |
echo '/swapFile none swap sw 0 0' | sudo tee -a /etc/fstab | |
sudo sysctl vm.swappiness=10 | |
sudo sysctl vm.vfs_cache_pressure=50 | |
fi | |
echo "Swap Size is... " | |
free -h |grep Swap | |
## install QRL | |
cd /usr/local/src && wget https://cmake.org/files/v3.10/cmake-3.10.3.tar.gz && tar xvf cmake-3.10.3.tar.gz && cd cmake-3.10.3 && ./bootstrap && make && make install && cd .. && rm -rf cmake* | |
pip3 install -U setupTools | |
pip3 install -U qrl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment