Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Conversation

@leezu
Copy link
Contributor

@leezu leezu commented Apr 27, 2020

Enable docker cache build for images listed in docker-compose.yml
Ignore docker-compose.yml related files in ci/build_cache.py

@mxnet-bot
Copy link

Hey @leezu , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [unix-gpu, sanity, website, centos-cpu, miscellaneous, windows-cpu, unix-cpu, clang, edge, centos-gpu, windows-gpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@leezu leezu force-pushed the fixdockercachebuild branch from 6e8f14f to 566a68a Compare April 27, 2020 20:07
timeout(time: total_timeout, unit: 'MINUTES') {
utils.init_git()
sh "python3 ./ci/docker_cache.py --docker-registry ${env.DOCKER_CACHE_REGISTRY}"
sh "cd ci && docker-compose -f docker/docker-compose.yml build --parallel && docker-compose -f docker/docker-compose.yml push "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you pull that into docker_cache.py to leverage parallelisation wrt non updated images and also providing one single interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is to delete docker_cache.py later, so the docker-compose -f docker/docker-compose.yml build --parallel && docker-compose -f docker/docker-compose.yml push would be the unified interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what parallelism you refer to. Is docker-compose build --parallel not sufficient?

Copy link
Contributor

@marcoabreu marcoabreu Apr 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand.

It's not sufficient in the sense of that docker-cache and docker compose are run in sequence. Alternatively, create a second parallel step so it runs on another node?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker-cache will only be used temporarily. I think the current solution is fine given that the first step (sh "python3 ./ci/docker_cache.py) will be deleted later.

On Ubuntu you may install them via `sudo apt-get install docker.io docker-compose`
and set them up via `sudo usermod $(whoami) -G docker -a`.

Then, to run tests inside docker run the following command
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add pip3 install -r ci/requirements.txt
Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add it in a separate PR to unblock merging this fix. We can also consider getting rid of that dependency by moving relying on standard tools instead of using our custom scripts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. But custom scripts sort of make job easier for lazy people like me :p having to google steps for getting those standard tools. What do you reckon? Apart from taking the onus of ensuring testing is correct rather than leaving it to users to find their way out of the problems that may come up with setting up those standard tools on their own.

@leezu
Copy link
Contributor Author

leezu commented Apr 28, 2020

@mxnet-bot run ci [sanity]

@mxnet-bot
Copy link

Jenkins CI successfully triggered : [sanity]

@leezu leezu merged commit 3a76ab6 into apache:master Apr 28, 2020
@leezu leezu deleted the fixdockercachebuild branch April 28, 2020 01:32
@ChaiBapchya
Copy link
Contributor

@leezu
Copy link
Contributor Author

leezu commented Apr 28, 2020

The run you point out fails due to flakyness of dockerhub.
Dockerhub suddenly rejects our credentials and we get [2020-04-28T01:55:45.399Z] denied: requested access to the resource is denied

After retrigger, that error is gone. However, there's another error to be fixed by
#18183

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants