Skip to content

Improve Docker build speed in CI #1731

@wangkuiyi

Description

@wangkuiyi

I see that in the .travis.yaml file of SQLFlow, there is a line

https://github.com/sql-machine-learning/sqlflow/blob/a033b42926e4d0ccf63c044e414aa99eb9dfcfaf/.travis.yml#L38

It seems that our .travis.yaml doesn't have such a line

elasticdl/.travis.yml

Lines 25 to 31 in 3a157c1

jobs:
include:
- stage: precommit
name: "Pre-commit Check"
script:
- docker build -t elasticdl:dev -f elasticdl/docker/Dockerfile.dev .
- docker run --rm -it -v $PWD:/work -w /work elasticdl:dev bash -c "pre-commit run --files $(find elasticdl/python model_zoo setup.py scripts/ -name '*.py' -print0 | tr '\0' ' ') $(find elasticdl/pkg -name '*.go' -print0 | tr '\0' ' ')"

If we add such a trick, would it accelerate the CI?

Metadata

Metadata

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