diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c5d5ff1c..7f4063b8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,6 +21,10 @@ jobs: run: make TAG=amd64-latest image-tier3 - name: Test tier 3 Docker image run: make TAG=amd64-latest test-tier3 + - name: Build tier icpc Docker image + run: make TAG=amd64-latest image-tiericpc + - name: Test tier icpc Docker image + run: make TAG=amd64-latest test-tiericpc - name: Push images to Docker if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master' run: | @@ -28,6 +32,7 @@ jobs: docker push vnoj/runtimes-tier1:amd64-latest docker push vnoj/runtimes-tier2:amd64-latest docker push vnoj/runtimes-tier3:amd64-latest + docker push vnoj/runtimes-tiericpc:amd64-latest docker run -v "$(pwd)":/code mplatform/manifest-tool \ --username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \ push from-spec /code/tier1/manifest.yml @@ -37,6 +42,9 @@ jobs: docker run -v "$(pwd)":/code mplatform/manifest-tool \ --username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \ push from-spec /code/tier3/manifest.yml + docker run -v "$(pwd)":/code mplatform/manifest-tool \ + --username="$DOCKER_USERNAME" --password="$DOCKER_PASSWORD" \ + push from-spec /code/tiericpc/manifest.yml env: DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/Makefile b/Makefile index b4e70c91..6be6829b 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ TAG ?= latest -.PHONY: all image-tier1 image-tier2 image-tier3 test-tier1 test-tier2 test-tier3 +.PHONY: all image-tiericpc image-tier1 image-tier2 image-tier3 test-tiericpc test-tier1 test-tier2 test-tier3 -all: image-tier1 image-tier2 image-tier3 +all: image-tiericpc image-tier1 image-tier2 image-tier3 + +image-tiericpc: + cd tiericpc && docker build -t vnoj/runtimes-tiericpc -t vnoj/runtimes-tiericpc:$(TAG) -t ghcr.io/vnoj/runtimes-tiericpc:$(TAG) . image-tier1: cd tier1 && docker build -t vnoj/runtimes-tier1 -t vnoj/runtimes-tier1:$(TAG) -t ghcr.io/vnoj/runtimes-tier1:$(TAG) . @@ -13,7 +16,10 @@ image-tier2: image-tier1 image-tier3: image-tier2 cd tier3 && docker build -t vnoj/runtimes-tier3 -t vnoj/runtimes-tier3:$(TAG) -t ghcr.io/vnoj/runtimes-tier3:$(TAG) . -test: test-tier1 test-tier2 test-tier3 +test: test-tiericpc test-tier1 test-tier2 test-tier3 + +test-tiericpc: + docker run --rm -v "`pwd`/test":/code --cap-add=SYS_PTRACE vnoj/runtimes-tiericpc test-tier1: docker run --rm -v "`pwd`/test":/code --cap-add=SYS_PTRACE vnoj/runtimes-tier1 diff --git a/tiericpc/Dockerfile b/tiericpc/Dockerfile new file mode 100644 index 00000000..dea54287 --- /dev/null +++ b/tiericpc/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:jammy + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + curl file gcc g++ python3-full python3-pip python3-dev python3-setuptools python3-wheel cython3 libseccomp-dev bzip2 unzip \ + tini ca-certificates-java openjdk-17-jdk-headless openjdk-17-jre-headless \ + $([ "$(arch)" = aarch64 ] && echo binutils-arm-linux-gnueabihf) && \ + if [ "$(arch)" = x86_64 ]; then PYPY_ARCH=linux64; else PYPY_ARCH="$(arch)"; fi && \ + mkdir /opt/pypy2 && curl -L "https://downloads.python.org/pypy/pypy2.7-v7.3.10-$PYPY_ARCH.tar.bz2" | \ + tar xj -C /opt/pypy2 --strip-components=1 && /opt/pypy2/bin/pypy -mcompileall && \ + chmod a+rx /opt/pypy2/lib /opt/pypy2/lib/*.so* && \ + rm -f /opt/pypy2/bin/python* && \ + mkdir /opt/pypy3 && curl -L "https://downloads.python.org/pypy/pypy3.9-v7.3.10-$PYPY_ARCH.tar.bz2" | \ + tar xj -C /opt/pypy3 --strip-components=1 && /opt/pypy3/bin/pypy -mcompileall && \ + rm -f /opt/pypy3/bin/python* && \ + curl -L -okotlin.zip https://github.com/JetBrains/kotlin/releases/download/v1.7.21/kotlin-compiler-1.7.21.zip && \ + unzip kotlin.zip && mv kotlinc /opt/kotlin && rm kotlin.zip && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + useradd -m judge + +ENV PATH="/opt/kotlin/bin:/opt/pypy3/bin:${PATH}" + +ENTRYPOINT ["/usr/bin/tini", "/code/run"] diff --git a/tiericpc/manifest.yml b/tiericpc/manifest.yml new file mode 100644 index 00000000..e62c0484 --- /dev/null +++ b/tiericpc/manifest.yml @@ -0,0 +1,12 @@ +image: vnoj/runtimes-tiericpc:latest +manifests: + - + image: vnoj/runtimes-tiericpc:amd64-latest + platform: + architecture: amd64 + os: linux + - + image: vnoj/runtimes-tiericpc:aarch64-latest + platform: + architecture: arm64 + os: linux