|
1 | | -FROM ubuntu:latest AS build |
| 1 | +FROM ubuntu:latest AS builder |
2 | 2 |
|
3 | | -WORKDIR /root |
| 3 | +WORKDIR /tmp |
4 | 4 |
|
5 | | -# |
6 | | -# Dependencies |
7 | | -# |
| 5 | +ENV DEBIAN_FRONTEND=noninteractive |
8 | 6 |
|
9 | | -RUN apt-get update -qq \ |
10 | | - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
11 | | - # Common |
12 | | - build-essential \ |
13 | | - ca-certificates \ |
14 | | - git \ |
15 | | - python3 \ |
16 | | - zlib1g-dev \ |
17 | | - # GHDL |
18 | | - gnat \ |
19 | | - # iVerilog & Verilator |
20 | | - autoconf \ |
21 | | - bison \ |
22 | | - flex \ |
23 | | - gperf \ |
24 | | - # Verilator |
25 | | - help2man \ |
26 | | - libfl2 \ |
27 | | - libfl-dev \ |
28 | | - zlib1g \ |
29 | | - ccache \ |
30 | | - mold \ |
31 | | - # cocotb |
32 | | - python3-pip \ |
33 | | - libpython3-dev \ |
34 | | - libgoogle-perftools-dev numactl \ |
35 | | - && apt-get autoclean && apt-get clean && apt-get -y autoremove \ |
36 | | - && rm -rf /var/lib/apt/lists/* |
| 7 | +RUN apt-get update -qq |
| 8 | +RUN apt-get install -y --no-install-recommends ca-certificates git |
| 9 | +RUN apt-get install -y --no-install-recommends autoconf build-essential bison flex |
| 10 | +RUN apt-get install -y --no-install-recommends autoconf gnat zlib1g-dev libfl-dev |
| 11 | +RUN apt-get install -y --no-install-recommends python3 gperf help2man |
37 | 12 |
|
38 | 13 | # |
39 | | -# GHDL |
| 14 | +# ghdl |
40 | 15 | # |
41 | 16 |
|
42 | | -RUN git clone --depth 1 https://github.com/ghdl/ghdl \ |
43 | | - && mkdir ghdl/build && cd ghdl/build \ |
44 | | - && ../configure --prefix=/usr/local \ |
| 17 | +RUN git clone --depth 1 https://github.com/ghdl/ghdl |
| 18 | +RUN mkdir ghdl/build && cd ghdl/build && ../configure --prefix=/usr/local \ |
45 | 19 | && make -j$(nproc) && make install |
46 | 20 |
|
47 | 21 | # |
48 | 22 | # iVerilog |
49 | 23 | # |
50 | 24 |
|
51 | | -RUN git clone --depth 1 https://github.com/steveicarus/iverilog \ |
52 | | - && cd iverilog && autoconf && ./configure \ |
| 25 | +RUN git clone --depth 1 https://github.com/steveicarus/iverilog |
| 26 | +RUN cd iverilog && autoconf && ./configure \ |
53 | 27 | && make -j$(nproc) && make install |
54 | 28 |
|
55 | 29 | # |
56 | 30 | # Verilator |
57 | 31 | # |
58 | 32 |
|
59 | | -RUN git clone --depth 1 https://github.com/verilator/verilator \ |
60 | | - && cd verilator && autoconf && ./configure \ |
| 33 | +RUN git clone --depth 1 https://github.com/verilator/verilator |
| 34 | +RUN cd verilator && autoconf && ./configure \ |
61 | 35 | && make -j$(nproc) && make install |
62 | 36 |
|
63 | 37 | # |
64 | 38 | # cocotb |
65 | 39 | # |
66 | 40 |
|
67 | | -RUN pip install cocotb --break-system-packages |
| 41 | +# RUN pip install cocotb --break-system-packages |
68 | 42 |
|
69 | | -# |
70 | | -# Clean-up |
71 | | -# |
| 43 | +#------------------------------------------------------------------------------ |
| 44 | + |
| 45 | +FROM ubuntu:latest AS runtime |
72 | 46 |
|
73 | | -############################################################################### |
| 47 | +COPY --from=builder /usr/local /usr/local |
74 | 48 |
|
75 | | -# FROM ubuntu:latest |
| 49 | +RUN ldconfig |
0 commit comments