From 5dbfdf164de1ccaba6a68ebd5467b3711bb7dce6 Mon Sep 17 00:00:00 2001 From: shiqi cao Date: Tue, 26 Nov 2024 14:16:42 -0800 Subject: [PATCH 1/3] enable jemalloc --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index d0ecee6..1f43e8d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,12 +40,15 @@ FROM debian:bookworm-slim AS runtime-base RUN apt-get update && \ apt-get install -y --no-install-recommends \ + ibjemalloc-dev \ curl \ ca-certificates \ procps \ && \ rm -rf /var/lib/apt/lists/* +ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so + RUN adduser --uid 1000 --home /sui --gecos '' --disabled-password sui WORKDIR /sui From cebaaf33fe636dfb011ebb6db0cbbdda910e045a Mon Sep 17 00:00:00 2001 From: shiqi cao Date: Tue, 26 Nov 2024 14:31:13 -0800 Subject: [PATCH 2/3] build jemalloc test --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1f43e8d..b6fcf6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,14 +40,17 @@ FROM debian:bookworm-slim AS runtime-base RUN apt-get update && \ apt-get install -y --no-install-recommends \ - ibjemalloc-dev \ curl \ ca-certificates \ + dpkg-dev \ + libjemalloc-dev \ procps \ && \ rm -rf /var/lib/apt/lists/* -ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libjemalloc.so +RUN ln -s /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libjemalloc.so /usr/lib/libjemalloc.so + +ENV LD_PRELOAD=/usr/lib/libjemalloc.so RUN adduser --uid 1000 --home /sui --gecos '' --disabled-password sui WORKDIR /sui From 0ea0caf6f70db8adb1c31f7c1c1fdac0e4cca84f Mon Sep 17 00:00:00 2001 From: shiqi cao Date: Tue, 3 Dec 2024 12:20:15 -0800 Subject: [PATCH 3/3] address feedback --- Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index b6fcf6b..66f908f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,15 +42,12 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl \ ca-certificates \ - dpkg-dev \ - libjemalloc-dev \ + libjemalloc2 \ procps \ && \ rm -rf /var/lib/apt/lists/* -RUN ln -s /usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/libjemalloc.so /usr/lib/libjemalloc.so - -ENV LD_PRELOAD=/usr/lib/libjemalloc.so +ENV LD_PRELOAD=libjemalloc.so.2 RUN adduser --uid 1000 --home /sui --gecos '' --disabled-password sui WORKDIR /sui