|
| 1 | +# syntax=docker/dockerfile:1.7-labs |
| 2 | + |
1 | 3 | # Target with dependencies to build all flow tools from their sources. |
2 | 4 | # i.e., "./build_openroad.sh --local" from inside a docker container |
3 | 5 | # NOTE: don't use this file directly unless you know what you are doing, |
4 | 6 | # instead use etc/DockerHelper.sh |
| 7 | + |
5 | 8 | ARG fromImage=openroad/flow-ubuntu22.04-dev:latest |
6 | 9 |
|
7 | | -FROM $fromImage AS openroad-builder-base |
| 10 | +FROM $fromImage AS orfs-base |
8 | 11 |
|
9 | | -ARG numThreads=$(nproc) |
10 | | - |
11 | | -COPY . /OpenROAD-flow-scripts |
12 | 12 | WORKDIR /OpenROAD-flow-scripts |
| 13 | +COPY --link dev_env.sh dev_env.sh |
| 14 | +COPY --link build_openroad.sh build_openroad.sh |
13 | 15 |
|
14 | | -RUN ./build_openroad.sh --no_init --local --threads ${numThreads} |
15 | | - |
16 | | -FROM $fromImage AS openroad-flow-scripts-base |
| 16 | +FROM orfs-base AS orfs-builder-base |
17 | 17 |
|
18 | | -COPY . /OpenROAD-flow-scripts |
19 | | - |
20 | | -RUN rm -rf /OpenROAD-flow-scripts/tools /OpenROAD-flow-scripts/.git |
21 | | - |
22 | | -COPY --from=openroad-builder-base /OpenROAD-flow-scripts/tools/install /OpenROAD-flow-scripts/tools/install |
23 | | - |
24 | | -FROM $fromImage |
| 18 | +COPY --link tools tools |
| 19 | +ARG numThreads=$(nproc) |
25 | 20 |
|
26 | | -COPY --from=openroad-flow-scripts-base /OpenROAD-flow-scripts /OpenROAD-flow-scripts |
27 | | -WORKDIR /OpenROAD-flow-scripts |
| 21 | +RUN echo "" > tools/yosys/abc/.gitcommit && \ |
| 22 | + ./build_openroad.sh --no_init --local --threads ${numThreads} |
| 23 | + |
| 24 | +FROM orfs-base |
| 25 | + |
| 26 | +# The order for copying the directories is based on the frequency of changes (ascending order), |
| 27 | +# and the layer size (descending order) |
| 28 | +COPY --link docker docker |
| 29 | +COPY --link flow/tutorials flow/tutorials |
| 30 | +COPY --link docs docs |
| 31 | +COPY --link flow/test flow/test |
| 32 | +COPY --link flow/platforms flow/platforms |
| 33 | +COPY --link flow/util flow/util |
| 34 | +COPY --link flow/scripts flow/scripts |
| 35 | +COPY --link flow/designs flow/designs |
| 36 | + |
| 37 | +COPY --link --from=orfs-builder-base /OpenROAD-flow-scripts/tools/install tools/install |
| 38 | +COPY --link \ |
| 39 | + --exclude=.git* --exclude=tools/ --exclude=docs/ --exclude=docker/ \ |
| 40 | + --exclude=flow/designs --exclude=flow/platforms --exclude=flow/scripts \ |
| 41 | + --exclude=flow/test --exclude=flow/tutorials --exclude=flow/util \ |
| 42 | + . ./ |
0 commit comments