Skip to content

Commit 034110a

Browse files
committed
feat: add tiercuda
1 parent bc6d93f commit 034110a

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ TAG ?= latest
44

55
all: image-tiericpc image-tier1 image-tier2 image-tier3
66

7+
image-tiercuda:
8+
cd tiercuda && docker build -t vnoj/runtimes-tiercuda -t vnoj/runtimes-tiercuda:$(TAG) -t ghcr.io/vnoj/runtimes-tiercuda:$(TAG) .
9+
710
image-tiericpc:
811
cd tiericpc && docker build -t vnoj/runtimes-tiericpc -t vnoj/runtimes-tiericpc:$(TAG) -t ghcr.io/vnoj/runtimes-tiericpc:$(TAG) .
912

tiercuda/Dockerfile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
FROM nvidia/cuda:12.8.1-devel-ubuntu24.04 AS base
2+
3+
# Install run-time dependencies in base image
4+
RUN apt-get -y update && apt-get install -y \
5+
libc6 \
6+
libstdc++6 \
7+
libprotobuf32 \
8+
libnl-route-3-200
9+
10+
FROM base AS build
11+
12+
# Install build dependencies only in builder image
13+
RUN apt-get install -y \
14+
autoconf \
15+
bison \
16+
flex \
17+
gcc \
18+
g++ \
19+
git \
20+
libprotobuf-dev \
21+
libnl-route-3-dev \
22+
libtool \
23+
make \
24+
pkg-config \
25+
protobuf-compiler
26+
27+
RUN git clone https://github.com/google/nsjail.git /nsjail
28+
29+
RUN cd /nsjail && make clean && make
30+
31+
FROM base AS run
32+
33+
# Copy over build result and trim image
34+
RUN rm -rf /var/lib/apt/lists/*
35+
COPY --from=build /nsjail/nsjail /bin
36+
37+
RUN apt-get update && \
38+
apt-get install -y --no-install-recommends \
39+
curl file gcc g++ python3-full python3-pip python3-dev python3-setuptools python3-wheel cython3 libseccomp-dev bzip2 gzip \
40+
fp-compiler libxtst6 tini ca-certificates-java openjdk-8-jdk-headless openjdk-8-jre-headless \
41+
$([ "$(arch)" = aarch64 ] && echo binutils-arm-linux-gnueabihf) && \
42+
mkdir -p /etc/perl && \
43+
apt-get clean && rm -rf /var/lib/apt/lists/* && \
44+
useradd -m judge
45+
46+
ENTRYPOINT ["/usr/bin/tini", "/code/run"]

0 commit comments

Comments
 (0)