Run go-judge inside docker #82

Closed
opened 2025-01-11 09:47:53 +08:00 by 张泊明518370910136 · 4 comments
$ docker run -it --rm \
  --cgroupns=host -v /sys/fs/cgroup/go-judge:/sys/fs/cgroup:rw \
  --security-opt seccomp=unconfined \
  --shm-size=256m \
  -p 5050:5050 -p 5051:5051 \
  --name=go-judge \
  focs.ji.sjtu.edu.cn:5000/criyle/go-judge:llvm -enable-grpc
```bash $ docker run -it --rm \ --cgroupns=host -v /sys/fs/cgroup/go-judge:/sys/fs/cgroup:rw \ --security-opt seccomp=unconfined \ --shm-size=256m \ -p 5050:5050 -p 5051:5051 \ --name=go-judge \ focs.ji.sjtu.edu.cn:5000/criyle/go-judge:llvm -enable-grpc ```
张泊明518370910136 added the
enhancement
label 2025-01-11 09:47:53 +08:00
Author
Owner

Dockerfile for that image (focs.ji.sjtu.edu.cn:5000/criyle/go-judge:latest has been pushed and ready to use now):

FROM focs.ji.sjtu.edu.cn:5000/criyle/go-judge:latest

RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y vim wget curl
RUN apt-get install -y git gcc g++ clang clang-tools
RUN apt-get install -y lsb-release software-properties-common gnupg
RUN apt-get install -y cmake
RUN apt-get install -y cppcheck cpplint
WORKDIR /root
RUN wget https://apt.llvm.org/llvm.sh
RUN chmod +x llvm.sh
RUN ./llvm.sh 18 all
RUN rm -f llvm.sh
Dockerfile for that image (`focs.ji.sjtu.edu.cn:5000/criyle/go-judge:latest` has been pushed and ready to use now): ``` FROM focs.ji.sjtu.edu.cn:5000/criyle/go-judge:latest RUN apt-get update && apt-get upgrade -y RUN apt-get install -y vim wget curl RUN apt-get install -y git gcc g++ clang clang-tools RUN apt-get install -y lsb-release software-properties-common gnupg RUN apt-get install -y cmake RUN apt-get install -y cppcheck cpplint WORKDIR /root RUN wget https://apt.llvm.org/llvm.sh RUN chmod +x llvm.sh RUN ./llvm.sh 18 all RUN rm -f llvm.sh ```
Author
Owner

Can provide Dockerfile to students to let them have the exact(?) same environment as JOJ3

  • not that exact, students do not need to run them inside go-judge, but just the docker container
Can provide `Dockerfile` to students to let them have the exact(?) same environment as JOJ3 - not that exact, students do not need to run them inside go-judge, but just the docker container
Author
Owner

Check JOJ/go-judge-images for Dockerfile. Currently, the lxc config does not allow privileged docker container or mount /proc to run go-judge inside a docker container.

Check JOJ/go-judge-images for Dockerfile. Currently, the lxc config does not allow privileged docker container or mount `/proc` to run `go-judge` inside a docker container.
张泊明518370910136 added the
wontfix
label 2025-02-24 08:56:57 +08:00
Author
Owner

Mount /proc seems impossible in an unprivileged lxc container.

Mount `/proc` seems impossible in an unprivileged lxc container.
Sign in to join this conversation.
No description provided.