From 015279e7b4589345c12f8bea76f020ab7907859e Mon Sep 17 00:00:00 2001 From: Sergey Karayev Date: Thu, 28 Feb 2019 15:08:26 -0800 Subject: [PATCH 1/2] Update slim.js --- lib/slim.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/slim.js b/lib/slim.js index 965be7d0..ae9155fb 100644 --- a/lib/slim.js +++ b/lib/slim.js @@ -3,7 +3,12 @@ const glob = require('glob-all'); const fse = require('fs-extra'); const getStripMode = options => { - if (options.slim === false || options.slim === 'false') { + if ( + options.strip === false || + options.strip === 'false' || + options.slim === false || + options.slim === 'false' + ) { return 'skip'; } else if (options.dockerizePip) { return 'docker'; From 6960cd93b1370dec41005dabb9ae145532a94ed4 Mon Sep 17 00:00:00 2001 From: Sergey Karayev Date: Thu, 28 Feb 2019 15:12:56 -0800 Subject: [PATCH 2/2] Update README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index d1d03daa..e519289e 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,16 @@ custom: This will remove all folders within the installed requirements that match the names in `slimPatterns` +#### Option not to strip binaries + +In some cases, stripping binaries leads to problems like "ELF load command address/offset not properly aligned", even when done in the Docker environment. You can still slim down the package without `*.so` files with +```yaml +custom: + pythonRequirements: + slim: true + strip: false +``` + ### Lamba Layer Another method for dealing with large dependencies is to put them into a [Lambda Layer](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html).