fish-cpp: add libgomp1 to runtime image — s2 binary needs OpenMP at runtime

Build succeeded after the libcuda.so symlink fix, but the first
/v1/tts request returned HTTP 500 with:
  s2 binary failed (rc=127): /usr/local/bin/s2: error while loading
  shared libraries: libgomp.so.1: cannot open shared object file

CMake auto-enabled OpenMP during the build (gcc's -fopenmp flag), so
the s2 binary dynamically links libgomp.so.1. The build-stage devel
image had it; the slim cuda:runtime base doesn't ship it by default.
Adding libgomp1 to the runtime image's apt install resolves it.
This commit is contained in:
2026-04-28 01:22:06 -07:00
parent dd571a3529
commit 99710c26a5
+6
View File
@@ -50,7 +50,13 @@ ENV DEBIAN_FRONTEND=noninteractive \
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 python3-pip python3-venv tini \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# libgomp1 = GNU OpenMP runtime — required by the s2 binary at runtime.
# CMake auto-enabled OpenMP at build time (gcc has -fopenmp), so the
# binary dynamically links libgomp.so.1; the slim cuda:runtime base
# doesn't include it by default. Without this, s2 fails on first
# invocation with "error while loading shared libraries: libgomp.so.1".
# Pull the shim deps into an isolated venv so we don't fight system pip.
RUN python3 -m venv /opt/venv