mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2025-11-04 14:50:01 +08:00
Create Branch 18.04
This commit is contained in:
parent
ad00bbbde1
commit
8fe53b55db
19
Dockerfile
19
Dockerfile
@ -1,18 +1,19 @@
|
|||||||
FROM registry.hub.docker.com/library/ubuntu:16.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
COPY build/java_policy /etc
|
COPY build/java_policy /etc
|
||||||
|
|
||||||
RUN buildDeps='software-properties-common git libtool cmake python-dev python3-pip python-pip libseccomp-dev' && \
|
RUN apt-get update && apt-get install -y wget && wget https://github.com/Harry-zklcdc/JudgeServer/raw/18.04/sources.list && mv sources18.04.list /etc/apt/sources.list && \
|
||||||
apt-get update && apt-get install -y python python3.5 python-pkg-resources python3-pkg-resources $buildDeps && \
|
buildDeps='software-properties-common git libtool cmake python-dev python3-pip python-pip libseccomp-dev' && \
|
||||||
add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-9 g++-9 && \
|
apt-get update && apt-get install -y python python3.6 python-pkg-resources python3-pkg-resources gcc-8 g++-8 openjdk-8-jdk $buildDeps && \
|
||||||
rm /usr/bin/gcc /usr/bin/g++ && ln -s /usr/bin/gcc-9 /usr/bin/gcc && ln -s /usr/bin/g++-9 /usr/bin/g++ && \
|
rm /usr/bin/gcc /usr/bin/g++ && ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ && \
|
||||||
add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk && \
|
pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/ && cp /usr/bin/pip /usr/bin/pip3 && \
|
||||||
pip3 install --no-cache-dir psutil gunicorn flask requests && \
|
pip install --no-cache-dir psutil gunicorn flask requests -i https://mirrors.aliyun.com/pypi/simple/ && \
|
||||||
|
pip uninstall idna -y && pip install --no-cache-dir idna -i https://mirrors.aliyun.com/pypi/simple/ && \
|
||||||
cd /tmp && git clone -b newnew --depth 1 https://github.com/QingdaoU/Judger && cd Judger && \
|
cd /tmp && git clone -b newnew --depth 1 https://github.com/QingdaoU/Judger && cd Judger && \
|
||||||
mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python3 setup.py install && \
|
mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python3 setup.py install && \
|
||||||
apt-get purge -y --auto-remove $buildDeps && \
|
apt-get purge -y --auto-remove wget $buildDeps && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
||||||
ln -s /usr/bin/gcc-9 /usr/bin/gcc && ln -s /usr/bin/g++-9 /usr/bin/g++ && \
|
ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ && \
|
||||||
mkdir -p /code && \
|
mkdir -p /code && \
|
||||||
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj
|
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj
|
||||||
|
|
||||||
|
|||||||
@ -1,25 +0,0 @@
|
|||||||
FROM ubuntu:18.04
|
|
||||||
|
|
||||||
COPY build/java_policy /etc
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y wget && wget https://raw.githubusercontent.com/Harry-zklcdc/JudgeServer/master/sources18.04.list && mv sources18.04.list /etc/apt/sources.list && \
|
|
||||||
buildDeps='software-properties-common git libtool cmake python-dev python3-pip python-pip libseccomp-dev' && \
|
|
||||||
apt-get update && apt-get install -y python python3.6 python-pkg-resources python3-pkg-resources gcc-8 g++-8 openjdk-8-jdk $buildDeps && \
|
|
||||||
rm /usr/bin/gcc /usr/bin/g++ && ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ && \
|
|
||||||
pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/ && cp /usr/bin/pip /usr/bin/pip3 && \
|
|
||||||
pip install --no-cache-dir psutil gunicorn flask requests -i https://mirrors.aliyun.com/pypi/simple/ && \
|
|
||||||
pip uninstall idna -y && pip install --no-cache-dir idna -i https://mirrors.aliyun.com/pypi/simple/ && \
|
|
||||||
cd /tmp && git clone -b newnew --depth 1 https://github.com/QingdaoU/Judger && cd Judger && \
|
|
||||||
mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python3 setup.py install && \
|
|
||||||
apt-get purge -y --auto-remove wget $buildDeps && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
|
||||||
ln -s /usr/bin/gcc-8 /usr/bin/gcc && ln -s /usr/bin/g++-8 /usr/bin/g++ && \
|
|
||||||
mkdir -p /code && \
|
|
||||||
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --retries=3 CMD python3 /code/service.py
|
|
||||||
ADD server /code
|
|
||||||
WORKDIR /code
|
|
||||||
RUN gcc -shared -fPIC -o unbuffer.so unbuffer.c
|
|
||||||
EXPOSE 8080
|
|
||||||
ENTRYPOINT /code/entrypoint.sh
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
FROM ubuntu:16.04
|
|
||||||
|
|
||||||
COPY build/java_policy /etc
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y wget && wget https://raw.githubusercontent.com/Harry-zklcdc/JudgeServer/master/sources.list && mv sources.list /etc/apt/sources.list && \
|
|
||||||
buildDeps='software-properties-common git libtool cmake python-dev python3-pip python-pip libseccomp-dev' && \
|
|
||||||
apt-get update && apt-get install -y python python3.5 python-pkg-resources python3-pkg-resources $buildDeps && \
|
|
||||||
add-apt-repository ppa:ubuntu-toolchain-r/test && apt-get update && apt-get install -y gcc-9 g++-9 && \
|
|
||||||
rm /usr/bin/gcc /usr/bin/g++ && ln -s /usr/bin/gcc-9 /usr/bin/gcc && ln -s /usr/bin/g++-9 /usr/bin/g++ && \
|
|
||||||
add-apt-repository ppa:openjdk-r/ppa && apt-get update && apt-get install -y openjdk-8-jdk && \
|
|
||||||
pip3 install --no-cache-dir psutil gunicorn flask requests -i https://mirrors.aliyun.com/pypi/simple/ && \
|
|
||||||
cd /tmp && git clone -b newnew --depth 1 https://github.com/QingdaoU/Judger && cd Judger && \
|
|
||||||
mkdir build && cd build && cmake .. && make && make install && cd ../bindings/Python && python3 setup.py install && \
|
|
||||||
apt-get purge -y --auto-remove wget $buildDeps && \
|
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/* && \
|
|
||||||
ln -s /usr/bin/gcc-9 /usr/bin/gcc && ln -s /usr/bin/g++-9 /usr/bin/g++ && \
|
|
||||||
mkdir -p /code && \
|
|
||||||
useradd -u 12001 compiler && useradd -u 12002 code && useradd -u 12003 spj && usermod -a -G code spj
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=5s --retries=3 CMD python3 /code/service.py
|
|
||||||
ADD server /code
|
|
||||||
WORKDIR /code
|
|
||||||
RUN gcc -shared -fPIC -o unbuffer.so unbuffer.c
|
|
||||||
EXPOSE 8080
|
|
||||||
ENTRYPOINT /code/entrypoint.sh
|
|
||||||
91
sources.list
91
sources.list
@ -1,33 +1,76 @@
|
|||||||
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
|
#阿里云 Ubuntu 18.04源
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
||||||
|
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
|
#网易源
|
||||||
|
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
|
||||||
|
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||||
|
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
|
||||||
|
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
||||||
|
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
||||||
|
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
|
#官方中国源
|
||||||
|
#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
|
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
||||||
|
# newer versions of the distribution.
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
|
||||||
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
|
## Major bug fix updates produced after the final release of the
|
||||||
|
## distribution.
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
|
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||||
|
## team. Also, please note that software in universe WILL NOT receive any
|
||||||
|
## review or updates from the Ubuntu security team.
|
||||||
|
#deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
|
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
||||||
|
## team, and may not be under a free licence. Please satisfy yourself as to
|
||||||
|
## your rights to use the software. Also, please note that software in
|
||||||
|
## multiverse WILL NOT receive any review or updates from the Ubuntu
|
||||||
|
## security team.
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
|
## N.B. software from this repository may not have been tested as
|
||||||
|
## extensively as that contained in the main release, although it includes
|
||||||
|
## newer versions of some applications which may provide useful features.
|
||||||
|
## Also, please note that software in backports WILL NOT receive any review
|
||||||
|
## or updates from the Ubuntu security team.
|
||||||
|
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
|
## Uncomment the following two lines to add software from Canonical's
|
||||||
|
## 'partner' repository.
|
||||||
|
## This software is not part of Ubuntu, but is offered by Canonical and the
|
||||||
|
## respective vendors as a service to Ubuntu users.
|
||||||
|
# deb http://archive.canonical.com/ubuntu bionic partner
|
||||||
|
# deb-src http://archive.canonical.com/ubuntu bionic partner
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
|
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
|
||||||
|
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
|
deb http://security.ubuntu.com/ubuntu bionic-security universe
|
||||||
|
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
|
||||||
deb http://archive.canonical.com/ubuntu xenial partner
|
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
|
||||||
|
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
|
||||||
deb-src http://archive.canonical.com/ubuntu xenial partner
|
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
|
|
||||||
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
|
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
|
|
||||||
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
|
|
||||||
|
|||||||
@ -1,76 +0,0 @@
|
|||||||
#阿里云 Ubuntu 18.04源
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
|
||||||
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
#网易源
|
|
||||||
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
|
|
||||||
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
|
|
||||||
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
|
|
||||||
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
|
||||||
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
|
|
||||||
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
#官方中国源
|
|
||||||
#deb cdrom:[Ubuntu 18.04.1 LTS _Bionic Beaver_ - Release amd64 (20180725)]/ bionic main restricted
|
|
||||||
|
|
||||||
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
|
|
||||||
# newer versions of the distribution.
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
|
|
||||||
|
|
||||||
## Major bug fix updates produced after the final release of the
|
|
||||||
## distribution.
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
|
|
||||||
|
|
||||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
|
||||||
## team. Also, please note that software in universe WILL NOT receive any
|
|
||||||
## review or updates from the Ubuntu security team.
|
|
||||||
#deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
|
|
||||||
|
|
||||||
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
|
|
||||||
## team, and may not be under a free licence. Please satisfy yourself as to
|
|
||||||
## your rights to use the software. Also, please note that software in
|
|
||||||
## multiverse WILL NOT receive any review or updates from the Ubuntu
|
|
||||||
## security team.
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
|
|
||||||
|
|
||||||
## N.B. software from this repository may not have been tested as
|
|
||||||
## extensively as that contained in the main release, although it includes
|
|
||||||
## newer versions of some applications which may provide useful features.
|
|
||||||
## Also, please note that software in backports WILL NOT receive any review
|
|
||||||
## or updates from the Ubuntu security team.
|
|
||||||
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
|
|
||||||
|
|
||||||
## Uncomment the following two lines to add software from Canonical's
|
|
||||||
## 'partner' repository.
|
|
||||||
## This software is not part of Ubuntu, but is offered by Canonical and the
|
|
||||||
## respective vendors as a service to Ubuntu users.
|
|
||||||
# deb http://archive.canonical.com/ubuntu bionic partner
|
|
||||||
# deb-src http://archive.canonical.com/ubuntu bionic partner
|
|
||||||
|
|
||||||
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
|
|
||||||
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
|
|
||||||
deb http://security.ubuntu.com/ubuntu bionic-security universe
|
|
||||||
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
|
|
||||||
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
|
|
||||||
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
|
|
||||||
Loading…
Reference in New Issue
Block a user