Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Pre-compile code to improve container startup time #334

Open
alysivji opened this issue Oct 2, 2020 · 0 comments
Open

Pre-compile code to improve container startup time #334

alysivji opened this issue Oct 2, 2020 · 0 comments
Labels

Comments

@alysivji
Copy link
Member

alysivji commented Oct 2, 2020

Great tips in the talk: Itamar Turner-Trauring - Best practices for production-ready Docker packaging

We should start pre-compiling code to improve startup time

# Compile installed code:
RUN python -c "import compileall; \
compileall.compile_path(maxlevels=10)"
# Compile code in a directory:
RUN python -m compileall yourpackage/

Additional information

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant