-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·42 lines (25 loc) · 1000 Bytes
/
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
#!/bin/bash
set -e
BUILD_PACKAGES="build-essential python2.7 python-dev virtualenv libdb-dev git"
RUNTIME_PACKAGES="python2.7 libpython2.7 virtualenv libdb-dev wget texlive-latex-base texlive-lang-polish texlive-latex-extra texlive-fonts-recommended lighttpd libstdc++6:i386 zlib1g:i386"
sudo chown -R oioioi:oioioi /sio2
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get --no-install-recommends -y install $BUILD_PACKAGES
git clone https://github.com/sio2project/sioworkers.git
git clone https://github.com/sio2project/oioioi.git
virtualenv -p python2 venv
. venv/bin/activate
pip install -e sioworkers
pip install -e oioioi
pip install psycopg2-binary uwsgi librabbitmq
# purge pip cache
rm -rf ~/.cache
oioioi-create-config deployment
cd deployment
deactivate
sudo apt-get --purge -y remove $BUILD_PACKAGES
sudo apt-get --purge -y autoremove
sudo apt-get --no-install-recommends -y install $RUNTIME_PACKAGES
sudo rm -rf /var/lib/apt/lists/*
sudo rm /tmp/build.sh