-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
124 lines (110 loc) · 3.72 KB
/
Dockerfile
File metadata and controls
124 lines (110 loc) · 3.72 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# CallGraph runtime builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_callgraph
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY callgraph/runtime runtime
RUN cd runtime && cargo build --release
# CallGraph LLVM Pass builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_llvm_pass
WORKDIR /app
COPY callgraph/llvm /app/llvm
RUN cd llvm && ./build.sh
# Argus builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_argus
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY argus/ /app/argus/
RUN cd argus && cargo build --release
# Bandld builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_bandld
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY bandld/ /app/bandld/
RUN cd bandld && cargo build --release
# GetCov builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_getcov
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /app
COPY getcov/ /app/getcov/
RUN cd getcov && cargo build --release
# SeedD builder
FROM gcr.io/oss-fuzz-base/base-builder@sha256:0241b5bf8a95a788807fd6632d544a0bae7289bd17f04b766dec79db7acab5f5 AS builder_seedd
COPY --from=golang:1.22 /usr/local/go /usr/local/go
ENV PATH="/usr/local/go/bin:${PATH}"
WORKDIR /app
COPY seedd/ /app/seedd/
RUN cd seedd && make
# Collect artifacts
# Use a minimal image to hold the artifacts
FROM cruizba/ubuntu-dind:noble-latest AS seedgen_runner
ENV DEBIAN_FRONTEND=noninteractive
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
RUN apt-get update && apt-get -y install \
7zip \
autoconf \
automake \
autotools-dev \
bash \
binutils \
bsdextrautils \
build-essential \
ca-certificates \
curl \
file \
git \
git-lfs \
gnupg2 \
gzip \
jq \
libcap2 \
ltrace \
make \
openssl \
patch \
perl-base \
python3 \
python3-dev \
python3-pip \
python3-setuptools \
python3-venv \
python3-wheel \
python-is-python3 \
rsync \
software-properties-common \
strace \
tar \
tzdata \
unzip \
vim \
wget \
xz-utils \
zip \
nodejs \
&& apt-get clean \
&& rm -rf /var/lib/{apt,dpkg,cache,log}
WORKDIR /app
RUN mkdir infra
COPY ./seedgen2 ./seedgen2
COPY ./infra ./infra
COPY ./utils ./utils
COPY ./task_handler.py ./task_handler.py
COPY ./requirements.txt ./requirements.txt
RUN mkdir -p infra/prebuilt
COPY --from=builder_callgraph /app/runtime/target/release/libcallgraph_rt.a ./infra/prebuilt/libcallgraph_rt.a
COPY --from=builder_llvm_pass /app/llvm/SeedMindCFPass.so ./infra/prebuilt/SeedMindCFPass.so
COPY --from=builder_argus /app/argus/target/release/argus ./infra/prebuilt/argus
COPY --from=builder_bandld /app/bandld/target/release/bandld ./infra/prebuilt/bandld
COPY --from=builder_getcov /app/getcov/target/release/getcov ./infra/prebuilt/getcov
COPY --from=builder_seedd /app/seedd/bin/seedd ./infra/prebuilt/seedd
RUN npm install -g @modelcontextprotocol/server-filesystem
RUN npm install -g @openai/codex@0.1.2504301751
RUN pip3 install -r requirements.txt --break-system-packages
RUN npm install -g tree-sitter-cli
ENV PYTHONUNBUFFERED=1
COPY ./entrypoint.sh ./entrypoint.sh
COPY ./treesitter_config.yaml ./treesitter_config.yaml
ENTRYPOINT ["./entrypoint.sh"]