File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ WORKDIR /build
11
11
COPY . .
12
12
RUN pip install . -t ./python/lib/$runtime/site-packages
13
13
14
- # Remove *.pyc files
15
- RUN find ./python/lib/$runtime/site-packages -name \* .pyc -delete
16
-
17
14
# Remove botocore (40MB) to reduce package size. aws-xray-sdk
18
15
# installs it, while it's already provided by the Lambda Runtime.
19
16
RUN rm -rf ./python/lib/$runtime/site-packages/botocore*
@@ -29,5 +26,9 @@ RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/st
29
26
RUN find . -name "*.dist-info" -type d | xargs rm -rf
30
27
31
28
29
+ RUN python -m compileall -b ./python/lib/$runtime/site-packages
30
+ RUN find ./python/lib/$runtime/site-packages -name \* .py -delete
31
+ RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+
32
+
32
33
FROM scratch
33
34
COPY --from=builder /build/python /
You can’t perform that action at this time.
0 commit comments