Skip to content

Commit 6c3efaf

Browse files
committed
feat(docker): collect tool LICENSE files into install dir
Copy LICENSE files from tool source trees into tools/install/licenses/ so they are included in the final image. Excludes tools/OpenROAD/src/sta. Fixes: https://github.com/The-OpenROAD-Project/AutoTuner/issues/146
1 parent b23706a commit 6c3efaf

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Build working directories
2+
tools/OpenROAD/build/
3+
tools/yosys-slang/build/
4+
tools/kepler-formal/build/
25

36
# Build files
47
build_openroad.log

docker/Dockerfile.builder

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,18 @@ if [ -n "${verificPath}" ]; then
4545
fi
4646
EOF
4747

48+
# Collect LICENSE files from tool source trees into the install directory so
49+
# they are available in the final image. tools/OpenROAD/src/sta is excluded
50+
# because it is covered by a separate commercial license agreement.
51+
RUN find /OpenROAD-flow-scripts/tools \( -name "*LICENSE*" -o -name "*LICENSES*" \) \
52+
| grep -v '/OpenROAD/src/sta/' \
53+
| grep -v '/AutoTuner/' \
54+
| while read -r f; do \
55+
rel="${f#/OpenROAD-flow-scripts/tools/}"; \
56+
mkdir -p "/OpenROAD-flow-scripts/tools/install/licenses/$(dirname "$rel")"; \
57+
cp -r "$f" "/OpenROAD-flow-scripts/tools/install/licenses/$rel"; \
58+
done
59+
4860
FROM orfs-base
4961

5062
# The order for copying the directories is based on the frequency of changes (ascending order),

0 commit comments

Comments
 (0)