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

Pre-compile code to improve container startup time #334

@alysivji

Description

@alysivji

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions