Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions dockerfiles/Dockerfile.langutils
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,20 @@ RUN apt-get install -y --no-install-recommends \
RUN cargo install --root /usr/local --git https://github.com/dalance/svlint.git svlint

#
# Optimization
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.so*" -exec strip --strip-unneeded {} + 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& find /usr/local/lib -name "*.so" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

FROM ubuntu:latest AS runtime

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share

RUN ldconfig
8 changes: 6 additions & 2 deletions dockerfiles/Dockerfile.nextpnr-apicula
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ RUN cd nextpnr && git submodule update --init --recursive \
&& make -j$(nproc) && make install

#
# Optimization
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

Expand All @@ -52,6 +54,8 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
python3 \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share

RUN ldconfig
8 changes: 6 additions & 2 deletions dockerfiles/Dockerfile.nextpnr-icestorm
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@ RUN cd nextpnr && git submodule update --init --recursive \
&& make -j$(nproc) && make install

#
# Optimization
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

FROM ubuntu:latest AS runtime

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share

RUN ldconfig
8 changes: 6 additions & 2 deletions dockerfiles/Dockerfile.nextpnr-trellis
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ RUN cd nextpnr && git submodule update --init --recursive \
&& make -j$(nproc) && make install

#
# Optimization
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

FROM ubuntu:latest AS runtime

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share

RUN ldconfig
9 changes: 6 additions & 3 deletions dockerfiles/Dockerfile.simulation
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,12 @@ RUN apt-get install -y --no-install-recommends \
RUN python3 -m venv /opt/venv && /opt/venv/bin/pip install --no-cache-dir cocotb

#
# Optimization
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.so*" -exec strip --strip-unneeded {} + 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

Expand All @@ -89,7 +90,9 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
zlib1g \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share
COPY --from=builder /opt/venv /opt/venv

RUN ldconfig
12 changes: 11 additions & 1 deletion dockerfiles/Dockerfile.synthesis
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ RUN cd synlig \
&& sed -i '1s/^/#include <cstdint>\n/' third_party/yosys/libs/json11/json11.cpp \
&& make install -j$(nproc)

#
# Optimization and clean-up
#

RUN strip /usr/local/bin/* 2>/dev/null || true
RUN find /usr/local/lib -name "*.a" -delete \
&& rm -rf /usr/local/lib/cmake /usr/local/*/pkgconfig

#------------------------------------------------------------------------------

FROM ubuntu:latest AS runtime
Expand All @@ -84,6 +92,8 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
libreadline-dev \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder /usr/local /usr/local
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/lib /usr/local/lib
COPY --from=builder /usr/local/share /usr/local/share

RUN ldconfig
Loading