-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·49 lines (32 loc) · 1.4 KB
/
setup.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
#!/bin/bash
set -euxo pipefail
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y cgroup-tools cgroupfs-mount curl python3 python3-pip python3-venv redis sudo tmux telnet net-tools sysstat
cgroupfs-mount
cgget -n -g cpu -g cpuacct -g cpuset /
MININET_LOC=~/mininet
if [[ ! -d $MININET_LOC ]]; then
(cd ~ && git clone [email protected]:mininet/mininet.git)
# (cd $MININET_LOC && git checkout -b mininet-2.3.1b4 2.3.1b4 )
fi
# installs nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install 22
# verifies the right Node.js version is in the environment
node -v # should print `v20.18.0`
# verifies the right npm version is in the environment
npm -v # should print `10.8.2`
#(cd $MININET_LOC && make mnexec)
npm install --global [email protected] [email protected]
cd "$(dirname "$0")"
( cd origin-ts && yarn install )
( cd edge-cache-ts && yarn install)
(cd mininet && python3 -m venv .venv)
#mv $MININET_LOC/mnexec .venv/bin/
#(cd auto-client && python3 -m venv .venv && ./.venv/bin/pip3 install -r requirements.txt)
source ./mininet/.venv/bin/activate
pip3 install -r ./mininet/requirements.txt
PYTHON=$(which python3) ~/mininet/util/install.sh -3a || true