Commit 96b100f
fix: reduce Lambda layer size by building Arrow without ICU (#3336)
* fix: reduce Lambda layer size by building Arrow without ICU (#3331)
Arrow 22 links against libicu when it is present in the build environment.
Dockerfile.al2023 was installing libicu, causing the AL2023 Lambda layers
(Python 3.12/3.13/3.14) to bundle libicudata.so.67 (~30 MB),
libicui18n.so.67, and libicuuc.so.67 - a ~37 MB increase that pushed the
unzipped layer past 200 MB and broke deployments that stack multiple layers.
The AL2 Dockerfile (Python 3.9-3.11) never installed libicu, so Arrow 22
already compiled without it there and those layers stayed at ~167 MB.
Fix:
- Remove libicu from Dockerfile.al2023 dnf install.
- Add -DARROW_WITH_ICU=OFF to the Arrow cmake invocation.
- Drop libicudata.so.67, libicui18n.so.67, libicuuc.so.67 from the bundle loop.
- Strip the bundled lib/*.so files to recover a few extra MB.
Expected layer size after this fix: ~167 MB (back to pre-3.16.1 levels).
Co-Authored-By: Bujji Babu Katta & Srihari Ponakala
* Strip debug info from shared libraries
Added a step to strip symbol tables and debug info from shared libraries to reduce binary size before zipping.
---------
Co-authored-by: S4srihari <srihariponakala@gmail.com>
Co-authored-by: Anton Kukushkin <kukushkin.anton@gmail.com>1 parent 493a539 commit 96b100f
2 files changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
| 115 | + | |
113 | 116 | | |
114 | | - | |
| 117 | + | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
| |||
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
0 commit comments