forked from Handgrip/GP-judger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare-docker.sh
38 lines (30 loc) · 952 Bytes
/
prepare-docker.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
HCDIR=$(dirname $(readlink -f "$0"))
# https://www.centos.org/centos-linux-eol/
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
dnf update --assumeyes
curl -fsSL https://rpm.nodesource.com/setup_18.x | bash -
pkgs="autoconf \
bison \
flex \
gcc \
gcc-c++ \
libstdc++ \
libstdc++-static \
glibc-static \
libtool \
make \
pkg-config \
protobuf-devel \
protobuf-compiler \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel \
python3 \
libnl3-devel \
nodejs"
dnf install --enablerepo=PowerTools --assumeyes $pkgs || dnf install --enablerepo=powertools --assumeyes $pkgs
mkdir /usr/local/lib/GP/nlohmann -p && curl 'https://github.com/nlohmann/json/releases/latest/download/json.hpp' -L -o /usr/local/lib/GP/nlohmann/json.hpp
python3 -m pip install --no-cache-dir numpy scipy
dnf clean all
rm -rf /var/cache/yum
rm -rf /var/cache/dnf