From f39eef51e651f02647641dca626cc24c57b05e27 Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Sat, 18 Nov 2023 21:40:47 +0800 Subject: [PATCH] feat: use s2oj-gcc --- judger/Dockerfile | 6 ++++-- judger/uoj_judger/include/uoj_run.h | 4 ++-- web/Dockerfile | 6 ++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/judger/Dockerfile b/judger/Dockerfile index 5d821b8..4041047 100644 --- a/judger/Dockerfile +++ b/judger/Dockerfile @@ -4,9 +4,11 @@ SHELL ["/bin/bash", "-c"] ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - apt-get install -y --no-install-recommends gnupg ca-certificates apt-transport-https && \ + apt-get install -y --no-install-recommends gnupg curl ca-certificates apt-transport-https && \ + curl https://git.m.ac/api/packages/baoshuo/debian/repository.key -o /etc/apt/trusted.gpg.d/gitmac-baoshuo.asc && \ + echo "deb https://git.m.ac/api/packages/baoshuo/debian all main" | tee -a /etc/apt/sources.list.d/gitmac-baoshuo.list && \ apt-get update && \ - for pkg in vim ntp zip unzip curl wget build-essential fp-compiler python2.7 python3.10 python3-requests libseccomp-dev openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk tzdata; do \ + for pkg in vim ntp zip unzip wget build-essential fp-compiler s2oj-gcc python2.7 python3.10 python3-requests libseccomp-dev openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk tzdata; do \ cnt=10 && \ while ! apt-get install -y "$pkg"; do \ if [ $cnt -le 0 ]; then \ diff --git a/judger/uoj_judger/include/uoj_run.h b/judger/uoj_judger/include/uoj_run.h index 4cc9047..6d66a10 100644 --- a/judger/uoj_judger/include/uoj_run.h +++ b/judger/uoj_judger/include/uoj_run.h @@ -10,8 +10,8 @@ #include #include -#define UOJ_GCC "/usr/bin/gcc-11" -#define UOJ_GPLUSPLUS "/usr/bin/g++-11" +#define UOJ_GCC "/usr/local/bin/s2oj-gcc" +#define UOJ_GPLUSPLUS "/usr/local/bin/s2oj-g++" #define UOJ_PYTHON2_7 "/usr/bin/python2.7" #define UOJ_PYTHON3 "/usr/bin/python3.10" #define UOJ_FPC "/usr/bin/fpc" diff --git a/web/Dockerfile b/web/Dockerfile index 6a4b0f9..8dcb15b 100644 --- a/web/Dockerfile +++ b/web/Dockerfile @@ -4,11 +4,13 @@ SHELL ["/bin/bash", "-c"] ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && \ - apt-get install -y --no-install-recommends gnupg ca-certificates apt-transport-https && \ + apt-get install -y --no-install-recommends gnupg curl ca-certificates apt-transport-https && \ + curl https://git.m.ac/api/packages/baoshuo/debian/repository.key -o /etc/apt/trusted.gpg.d/gitmac-baoshuo.asc && \ + echo "deb https://git.m.ac/api/packages/baoshuo/debian all main" | tee -a /etc/apt/sources.list.d/gitmac-baoshuo.list && \ (echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu jammy main" | tee /etc/apt/sources.list.d/ondrej-php.list) && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \ apt-get update && \ - for pkg in php7.4 php7.4-yaml php7.4-xml php7.4-dev php7.4-zip php7.4-mysql php7.4-mbstring php7.4-gd php7.4-curl php7.4-imagick libseccomp-dev git vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile php-pear mysql-client build-essential fp-compiler re2c libseccomp-dev libyaml-dev python2.7 python3.10 python3-requests openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk language-pack-zh-hans cron tzdata; do \ + for pkg in php7.4 php7.4-yaml php7.4-xml php7.4-dev php7.4-zip php7.4-mysql php7.4-mbstring php7.4-gd php7.4-curl php7.4-imagick libseccomp-dev git vim ntp zip unzip wget apache2 libapache2-mod-xsendfile php-pear mysql-client build-essential s2oj-gcc fp-compiler re2c libseccomp-dev libyaml-dev python2.7 python3.10 python3-requests openjdk-8-jdk openjdk-11-jdk openjdk-17-jdk language-pack-zh-hans cron tzdata; do \ cnt=10 && \ while ! apt-get install -y "$pkg"; do \ if [ $cnt -le 0 ]; then \