Skip to content

Commit

Permalink
[#62157] WIP: docker: Dockerfile.builder: Optimize dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn committed Jul 10, 2024
1 parent b9f5cda commit c8a0289
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# OpenROAD Flow

Minor modification

[![Build Status](https://jenkins.openroad.tools/buildStatus/icon?job=OpenROAD-flow-scripts-Public%2Fpublic_tests_all%2Fmaster)](https://jenkins.openroad.tools/view/Public/job/OpenROAD-flow-scripts-Public/job/public_tests_all/job/master/)
[![Docs](https://readthedocs.org/projects/openroad-flow-scripts/badge/?version=latest)](https://openroad-flow-scripts.readthedocs.io/en/latest/?badge=latest)

Expand Down
20 changes: 10 additions & 10 deletions docker/Dockerfile.builder
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# syntax=docker/dockerfile:1.7-labs

# Target with dependencies to build all flow tools from their sources.
# i.e., "./build_openroad.sh --local" from inside a docker container
# NOTE: don't use this file directly unless you know what you are doing,
# instead use etc/DockerHelper.sh

ARG fromImage=openroad/flow-ubuntu22.04-dev:latest

FROM $fromImage AS openroad-builder-base

ARG numThreads=$(nproc)

COPY . /OpenROAD-flow-scripts
WORKDIR /OpenROAD-flow-scripts
COPY --link dev_env.sh dev_env.sh
COPY --link build_openroad.sh build_openroad.sh
COPY --parents .git/modules tools ./
RUN ./build_openroad.sh --no_init --local --threads ${numThreads}

FROM $fromImage AS openroad-flow-scripts-base

COPY . /OpenROAD-flow-scripts

RUN rm -rf /OpenROAD-flow-scripts/tools /OpenROAD-flow-scripts/.git
FROM $fromImage AS openroad-flow-scripts-merged

COPY --from=openroad-builder-base /OpenROAD-flow-scripts/tools/install /OpenROAD-flow-scripts/tools/install
COPY --link --exclude=.git* --exclude=tools/ . /OpenROAD-flow-scripts/
COPY --link --from=openroad-builder-base /OpenROAD-flow-scripts/tools/install /OpenROAD-flow-scripts/tools/install/

FROM $fromImage

COPY --from=openroad-flow-scripts-base /OpenROAD-flow-scripts /OpenROAD-flow-scripts
COPY --from=openroad-flow-scripts-merged /OpenROAD-flow-scripts /OpenROAD-flow-scripts
WORKDIR /OpenROAD-flow-scripts

0 comments on commit c8a0289

Please sign in to comment.