Skip to content

Commit 44b6317

Browse files
committed
feat(docker): base from ubuntu 24.04
1 parent 6c28067 commit 44b6317

File tree

2 files changed

+36
-12
lines changed

2 files changed

+36
-12
lines changed

docker/cpp-sysroot.dockerfile

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
11
# llvm image is not re-built often, so the tag may be behind
22
FROM ghcr.io/faasm/llvm:0.7.0 AS llvm
33

4-
# faabric-base image is not re-built often, so tag may be behind
5-
FROM ghcr.io/faasm/faabric-base:0.22.0
4+
# Start from a fresh ubuntu image, cpp-sysroot has little built deps.
5+
FROM ubuntu:24.04
6+
7+
RUN set -eux; \
8+
apt update; \
9+
apt install -y --no-install-recommends \
10+
autoconf \
11+
automake \
12+
autopoint \
13+
autotools-dev \
14+
clang-17 \
15+
cmake \
16+
gettext \
17+
libtool \
18+
llvm-17 \
19+
m4 \
20+
ninja-build \
21+
make \
22+
pkg-config \
23+
python3-pip \
24+
python3-venv \
25+
git \
26+
vim-tiny; \
27+
apt autoremove -y; \
28+
apt clean; rm -rf /var/lib/apt/lists/*
29+
630
SHELL ["/bin/bash", "-c"]
731
ENV CPP_DOCKER="on"
832

9-
# Copy the toolchain and LLVM sources from the LLVM container
33+
# Copy the toolchain and LLVM OpenMP sources necessary to build libfaasmp
1034
COPY --from=llvm /usr/local/faasm /usr/local/faasm
11-
# COPY --from=llvm /opt/llvm-project /opt/llvm-project
35+
COPY --from=llvm \
36+
/opt/llvm-project/build/llvm/projects/openmp/runtime/src \
37+
/opt/llvm-project/build/llvm/projects/openmp/runtime/src
1238

13-
# Update APT dependencies
14-
RUN apt update && apt install -y autotools-dev
1539
# Get the code and submodules
1640
ARG SYSROOT_VERSION
1741
RUN mkdir -p /code \
@@ -42,9 +66,6 @@ RUN cd /code/cpp \
4266
libfaasmpi --native --shared \
4367
# Install toolchain files
4468
&& inv install \
45-
# Build wasi-libc and reset the sysroot. The second call to LLVM just
46-
# installs some headers that are purged
47-
&& inv llvm.libc --purge llvm \
4869
# Build Faasm WASM libraries for wasm32-wasi target
4970
&& inv \
5071
libfaasm \
@@ -55,12 +76,16 @@ RUN cd /code/cpp \
5576
libfaasm --threads \
5677
libemscripten --threads \
5778
libfaasmp \
58-
# Lastly, build the libraries that populate the sysroot
79+
# Lastly, build the libraries that populate the sysroot. For some reason
80+
# we need to re-run apt update for libtool to work properly.
81+
&& apt update \
5982
&& inv \
6083
libffi \
6184
libffi --threads \
6285
zlib \
63-
zlib --threads
86+
zlib --threads \
87+
&& apt autoremove -y \
88+
&& apt clean; rm -rf /var/lib/apt/lists/*
6489

6590
# CLI setup
6691
WORKDIR /code/cpp

libfaasmp/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ set(LIB_FILES
1616
if (CMAKE_SYSTEM_NAME STREQUAL "WASI")
1717
message(STATUS "Libfaasmp WebAssembly build")
1818

19-
set(LLVM_OMP_SRC_DIR "/opt/llvm-project/openmp/runtime/src")
2019
set(LLVM_OMP_BUILD_SRC_DIR "/opt/llvm-project/build/llvm/projects/openmp/runtime/src")
2120
set(LIBOMP_ASMFILES "z_Linux_asm.S")
2221
set(LIBOMP_HEADERS "${LLVM_OMP_BUILD_SRC_DIR}/omp.h")

0 commit comments

Comments
 (0)