-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (45 loc) · 1.83 KB
/
Dockerfile
File metadata and controls
65 lines (45 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM cskulab/isolate:latest
# Install build essentials
RUN apt-get update && apt-get install -y build-essential git cmake
RUN apt-get install -y wget gnupg lsb-release software-properties-common
# Add LLVM APT repository to sources
RUN wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 22
# Install clang-tidy 22
RUN apt-get install -y clang-tidy-22
RUN ln -sf /usr/bin/clang-tidy-22 /usr/bin/clang-tidy
RUN set -e \
&& clang-tidy --version | grep "LLVM version"
# Install Go compiler 1.24
RUN apt-get install -y wget tar
# Download Go 1.24
ENV GO_VERSION=1.24.7
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
&& rm -rf /usr/local/go \
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
&& rm go${GO_VERSION}.linux-amd64.tar.gz
# Set up environment
ENV PATH="/usr/local/go/bin:${PATH}"
COPY /compile_parser /tools/compile_parser
COPY /parsers /tools/lint_parser
COPY /sanitize-parser /tools/sanitize_parser
COPY /report_render /tools/report_render
RUN mkdir /grade
# Build the tools
RUN cd /tools/compile_parser && go build -o /grade/compile-parser
RUN cd /tools/lint_parser && go build -o /grade/lint-parser
RUN cd /tools/sanitize_parser && go build -o /grade/sanitize-parser
RUN cd /tools/report_render && GOOS=linux GOARCH=amd64 go build -o /usr/local/bin/report_render
#RUN mkdir /grade/reports/grading
# Add toolchain
COPY /cpp_autograde /grade
RUN rm /grade/grading && rm /grade/policy.json || true
RUN rm /grade/reports/aggregated/* && rm /grade/reports/compile/* && rm /grade/reports/lint/* && rm /grade/reports/sanitize/* || true
RUN rm /grade/build/orig/* && rm /grade/build/sanitized/* || true
#RUN gpg --import /grade/assignment_pk.asc
WORKDIR /grade
#RUN ./1_compile.sh
#RUN ./2_compile_sanitized.sh
#RUN ./3_lint.sh
#RUN ./4_strain_test.sh
#RUN ./5_test.sh
#RUN report_render