Skip to content

Cache Python packages in CI Docker runs #933

Open
@dshemetov

Description

@dshemetov

You can cache python packages between Docker runs like this

RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt

This requires the BuildKit functionality, which requires Docker >= 18.09 and can be activated with the environment variable DOCKER_BUILDKIT=1 docker build ..

If this is possible in CI, which it probably is, it could speed up CI runs as well as local image builds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions