Skip to content

Commit 46a30ac

Browse files
committed
ci: fix base image string argument
1 parent 6300602 commit 46a30ac

File tree

2 files changed

+123
-7
lines changed

2 files changed

+123
-7
lines changed

.github/workflows/build-and-push.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ jobs:
105105
# Read the base-image label from the source image for the current platform
106106
# ubuntu:noble as the fallback
107107
BASE=$(docker buildx imagetools inspect \
108-
--raw \
109108
"hpretl/iic-osic-tools:${{ needs.prepare.outputs.source_tag }}" \
110109
--format '{{ (index .Image.Config.Labels "org.opencontainers.image.base.name") }}' \
111110
2>/dev/null || true)

Dockerfile

Lines changed: 123 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
# as they are not shared libraries and ldd cannot see them.
2828

2929
ARG SOURCE_IMAGE=hpretl/iic-osic-tools:2025.12
30+
ARG BASE_IMAGE=ubuntu:noble
3031
FROM ${SOURCE_IMAGE} AS source
3132

3233
# Derive the needed apt-managed packages
@@ -47,9 +48,10 @@ RUN find \
4748
-type f \( -executable -o -name "*.so*" \) \
4849
| xargs ldd 2>/dev/null \
4950
| awk '/=>/ { print $3 }' \
50-
| grep -E '^/(usr/lib|lib)/' \
51+
| grep '^/' \
5152
| sort -u \
5253
| xargs dpkg -S 2>/dev/null \
54+
| grep -v '^diversion' \
5355
| cut -d: -f1 \
5456
| sort -u \
5557
> /tmp/apt-packages.txt
@@ -59,10 +61,9 @@ RUN find \
5961
# choose to install is pinned to exactly the version from this image.
6062
RUN pip3 freeze > /tmp/pip-constraints.txt
6163

62-
# Base image: defaults to ubuntu:noble but can be overridden at build time.
64+
# Base image: overridden at build time via --build-arg BASE_IMAGE=...
6365
# In CI the base is read from the org.opencontainers.image.base.name label
6466
# of the source image so this image always tracks the same base as iic-osic-tools.
65-
ARG BASE_IMAGE=ubuntu:noble
6667
FROM ${BASE_IMAGE}
6768

6869
ENV DEBIAN_FRONTEND=noninteractive \
@@ -72,6 +73,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
7273
TOOLS=/foss/tools \
7374
PDK_ROOT=/foss/pdks \
7475
DESIGNS=/foss/designs \
76+
STARTUPDIR=/dockerstartup \
7577
# Disable the PEP 668 "externally managed environment" restriction.
7678
# In a container this guard is pointless.
7779
PIP_BREAK_SYSTEM_PACKAGES=1
@@ -82,27 +84,138 @@ COPY --from=source /tmp/pip-constraints.txt /tmp/
8284
RUN apt-get update \
8385
# Install the shared-library packages derived from the ldd scan.
8486
&& xargs apt-get install -y --no-install-recommends < /tmp/apt-packages.txt \
85-
# Install interpreters and tools that the EDA tools invoke at runtime.
86-
# These are executables (not shared libraries) so ldd cannot find them.
87+
# Runtime libraries: the complete set from the source image's base install.
88+
# ldd only covers ELF-linked deps; dlopen/TCL-loaded libs must be listed explicitly.
8789
&& apt-get install -y --no-install-recommends \
8890
ca-certificates \
8991
locales \
9092
tzdata \
93+
libasound2t64 \
94+
libblas3 \
95+
libboost-filesystem1.83.0 \
96+
libboost-iostreams1.83.0 \
97+
libboost-program-options1.83.0 \
98+
libboost-python1.83.0 \
99+
libboost-serialization1.83.0 \
100+
libboost-system1.83.0 \
101+
libboost-thread1.83.0 \
102+
libbz2-1.0 \
103+
libcairo2 \
104+
libcurl4 \
105+
libdw1 \
106+
libedit2 \
107+
libexpat1 \
108+
libffi8 \
109+
libfftw3-double3 \
110+
libfftw3-long3 \
111+
libfftw3-single3 \
112+
libfindbin-libs-perl \
113+
libfl2 \
114+
libftdi1 \
115+
libgcc-s1 \
116+
libgettextpo0 \
117+
libgirepository-1.0-1 \
118+
libgit2-1.7 \
119+
libglu1-mesa \
120+
libgmp10 \
121+
libgomp1 \
122+
libgoogle-perftools4 \
123+
libgtk-3-0 \
124+
libgtk-4-1 \
125+
libhdf5-103-1 \
126+
libjpeg-turbo8 \
127+
libjudydebian1 \
128+
libklu2 \
129+
liblapack3 \
130+
liblzma5 \
131+
libmng2 \
132+
libmpc3 \
133+
libmpfr6 \
134+
libncurses6 \
135+
libgnat-13 \
136+
libnss-wrapper \
137+
libomp5-17 \
138+
libopenblas0 \
139+
libopenblas0-pthread \
140+
libopenmpi3 \
141+
libpcre2-8-0 \
142+
libpcre3 \
143+
libpython3.12 \
144+
libqhull-r8.0 \
145+
libqt5charts5 \
146+
libqt5multimedia5 \
147+
libqt5multimediawidgets5 \
148+
libqt5sql5t64 \
149+
libqt5svg5 \
150+
libqt5xml5t64 \
151+
libqt5xmlpatterns5 \
152+
libqt6charts6 \
153+
libqt6core5compat6 \
154+
libqt6core6t64 \
155+
libqt6help6 \
156+
libqt6multimedia6 \
157+
libqt6svg6 \
158+
libqt6svgwidgets6 \
159+
libqt6uitools6 \
160+
libre2-10 \
161+
libreadline8 \
162+
libsm6 \
163+
libsqlite3-0 \
164+
libssl3 \
165+
libsuitesparse-mongoose3 \
166+
libtcl8.6 \
167+
libtinyxml2.6.2v5 \
168+
libtomlplusplus3 \
169+
libtool \
170+
libvtk9.1t64 \
171+
libvtk9.1t64-qt \
172+
libwxgtk3.2-1 \
173+
libx11-6 \
174+
libx11-xcb1 \
175+
libxaw7 \
176+
libxcb1 \
177+
libxext6 \
178+
libxft2 \
179+
libxml2 \
180+
libxpm4 \
181+
libxrender1 \
182+
libxslt1.1 \
183+
libyaml-0-2 \
184+
libyaml-cpp0.8 \
185+
libz3-4 \
186+
libzip4 \
187+
libzstd1 \
188+
# Interpreters and executables invoked by EDA tools at runtime
189+
&& apt-get install -y --no-install-recommends \
91190
git \
92191
wget \
93192
curl \
94193
python3 \
95194
python3-pip \
96195
python3-venv \
196+
python3-pyqt5 \
197+
python3-pyqt6 \
198+
python3-tk \
199+
python-is-python3 \
97200
perl \
98201
ruby \
99202
ruby-irb \
100203
tcl \
204+
tclsh \
101205
tcllib \
206+
tcl-tclreadline \
207+
tk \
208+
binutils \
209+
mold \
102210
gcc \
103211
g++ \
104212
make \
213+
zlib1g-dev \
214+
ccache \
105215
clang-format \
216+
gawk \
217+
zip \
218+
unzip \
106219
&& locale-gen en_US.UTF-8 \
107220
&& rm -rf /var/lib/apt/lists/* /tmp/apt-packages.txt
108221

@@ -121,6 +234,7 @@ COPY --from=source ${TOOLS}/verilator ${TOOLS}/verilator/
121234
COPY --from=source ${TOOLS}/riscv-gnu-toolchain ${TOOLS}/riscv-gnu-toolchain/
122235
COPY --from=source ${TOOLS}/openroad ${TOOLS}/openroad/
123236
COPY --from=source ${TOOLS}/klayout ${TOOLS}/klayout/
237+
COPY --from=source ${TOOLS}/ghdl ${TOOLS}/ghdl/
124238

125239
# Unified bin directory with symlinks to all tools
126240
COPY --from=source ${TOOLS}/bin ${TOOLS}/bin/
@@ -137,6 +251,9 @@ COPY --from=source ${HOME}/.bashrc ${HOME}/.bashrc
137251
# tool version manifest
138252
COPY --from=source /tool_metadata.yml /tool_metadata.yml
139253

254+
# Entry point script and its dependencies (generate_container_user.sh, set_user_permission.sh)
255+
COPY --from=source /dockerstartup /dockerstartup/
256+
140257
# Default environment setup
141258

142259
ENV RISCV=${TOOLS}/riscv-gnu-toolchain
@@ -150,7 +267,7 @@ ${TOOLS}/openroad/bin:\
150267
${TOOLS}/klayout:\
151268
${PATH}
152269

153-
ENV LD_LIBRARY_PATH=${TOOLS}/klayout
270+
ENV LD_LIBRARY_PATH=${TOOLS}/klayout:${TOOLS}/ghdl/lib
154271

155272
# Python paths:
156273
# - pyosys: the Yosys Python API lives under the yosys share tree

0 commit comments

Comments
 (0)