forked from battlecode/bc18-scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_nodocker.sh
executable file
·34 lines (32 loc) · 958 Bytes
/
run_nodocker.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
#!/bin/bash
mtput() {
if command -v tput > /dev/null; then
tput $@
fi
}
if uname -s | grep -Fqe CYGWIN ; then
echo "run_nodocker.sh won't work on windows! Use run_nodocker.bat :)"
exit 1
fi
if uname -s | grep -Fqe MINGW ; then
echo "run_nodocker.sh won't work on windows! Use run_nodocker.bat :)"
exit 1
fi
echo "=== STARTING THE MANAGER (no docker) ==="
echo "=== ensuring dependencies ==="
mtput setaf 5
echo "$ pip3 install --user cffi eel tqdm werkzeug psutil"
mtput sgr0
pip3 install --user cffi eel tqdm werkzeug psutil
RESULT=$?
if [ $RESULT -ne 0 ]; then
echo "Warning: pip install failed!"
echo "I'll keep going, but maybe try to fix whatever error you just got."
fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PYTHONPATH="$DIR/battlecode/python:$PYTHONPATH"
export NODOCKER=1
mtput setaf 5
echo "$ python3 $DIR/battlecode-manager/gui.py"
mtput sgr0
python3 $DIR/battlecode-manager/gui.py