This is an automated email from the ASF dual-hosted git repository.
dongjoon-hyun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 7f2e1f0 [SPARK-57701] Install `libjemalloc2` in `Dockerfile.template`
7f2e1f0 is described below
commit 7f2e1f0a96af4eaf23fc5cf441de38bbdca66371
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Thu Jun 25 13:06:04 2026 -0700
[SPARK-57701] Install `libjemalloc2` in `Dockerfile.template`
### What changes were proposed in this pull request?
Like Apache Spark main repository, this PR aims to install `libjemalloc2`
in `Dockerfile.template` while the default allocator is unchanged
- https://github.com/apache/spark/pull/56782
### Why are the changes needed?
[jemalloc](http://jemalloc.net) reduces native/off-heap memory
fragmentation, especially `off-heap`, `PySpark`, `Apache Arrow`, and
`Spark-accellerator` use-cases. Shipping the package lets operators enable it
with one env var instead of building a custom image, with no regression for
anyone else.
### Does this PR introduce _any_ user-facing change?
No behavior change because the default allocator is unchanged; the image
just additionally ships `libjemalloc2`.
```
$ ls -al /usr/lib/aarch64-linux-gnu/libjemalloc.so.2
-rw-r--r-- 1 root root 527176 Apr 18 2024
/usr/lib/aarch64-linux-gnu/libjemalloc.so.2
```
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Opus 4.8
Closes #129 from dongjoon-hyun/SPARK-57701.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
Dockerfile.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Dockerfile.template b/Dockerfile.template
index ed07c88..7379701 100644
--- a/Dockerfile.template
+++ b/Dockerfile.template
@@ -23,7 +23,7 @@ RUN groupadd --system --gid=${spark_uid} spark && \
RUN set -ex; \
apt-get update; \
- apt-get install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user
libnss3 procps net-tools gosu libnss-wrapper; \
+ apt-get install -y gnupg2 wget bash tini libc6 libpam-modules krb5-user
libnss3 procps net-tools gosu libnss-wrapper libjemalloc2; \
mkdir -p /opt/spark; \
mkdir /opt/spark/python; \
mkdir -p /opt/spark/examples; \
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]