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*
@@ -27,5 +24,9 @@ RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/li
27
24
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/ddup/_ddup.*.so
28
25
RUN rm ./python/lib/$runtime/site-packages/ddtrace/internal/datadog/profiling/stack_v2/_stack_v2.*.so
29
26
27
+ RUN python -m compileall -b ./python/lib/$runtime/site-packages
28
+ RUN find ./python/lib/$runtime/site-packages -name \* .py -delete
29
+ RUN find ./python/lib/$runtime/site-packages -name __pycache__ -type d -exec rm -r {} \+
30
+
30
31
FROM scratch
31
32
COPY --from=builder /build/python /
You can’t perform that action at this time.
0 commit comments