Skip to content

Conversation

@driazati
Copy link
Member

@driazati driazati commented Jun 10, 2022

This activates the code from #11329 behind a couple Jenkins flags:

  • USE_AUTOUPDATED_DOCKER_IMAGES - whether or not to use the dynamically determined docker images in the build
  • PUSH_DOCKER_IMAGES - whether or not to push built images to tlcpack on main

These are there so we can quickly toggle this behavior off it breaks anything. Once this is on though, any docker changes in a PR should be reflected entirely in that build, so there would be no need for a separate PR to update the Docker images.

We will have to see if this works in practice, as the docker image builds do download quite a bit of data (which can flake) and add some runtime overhead (about 30m), so when an update lands all PRs will end up needing to rebuild until the merged commit finishes.

Thanks for contributing to TVM! Please refer to guideline https://tvm.apache.org/docs/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from Reviewers by @ them in the pull request thread.

cc @Mousius @areusch

@driazati
Copy link
Member Author

@tvm-bot rerun

@driazati driazati marked this pull request as ready for review June 10, 2022 21:05
@github-actions github-actions bot requested review from Mousius and areusch June 13, 2022 06:04
This activates the code from #11329 behind a couple Jenkins flags:
* `USE_AUTOUPDATED_DOCKER_IMAGES` - whether or not to use the dynamically determined docker images in the build
* `PUSH_DOCKER_IMAGES` - whether or not to push built images to `tlcpack` on `main`

These are there so we can quickly toggle this behavior off it breaks anything. Once this is on though, any docker changes in a PR should be reflected entirely in that build, so there would be no need for a separate PR to update the Docker images.

We will have to see if this works in practice, as the docker image builds do download quite a bit of data (which can flake) and add some runtime overhead (about 30m), so when an update lands all PRs will end up needing to rebuild until the merged commit finishes.
Copy link
Contributor

@areusch areusch left a comment

Choose a reason for hiding this comment

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

we discussed this today a bit in high-bandwidth and:

  • it's possible to write Dockerfiles that build idempotent images, but it's pretty hard. my concern here is that they won't always rebuild correctly and we'll get hard-to-trace CI bugs
  • @driazati proposed an alternate solution where, when changes have been made in tvm to docker/ since the last nightly-rebuilt image, the nightly CI validation pipeline opens a PR to update the images with newly-built ones. the PR CI test then can serve to validate them.
  • as part of this change, we would push the tested images to tlcpackstaging and modify Jenkinsfile such that, when it doesn't find a tlcpack/ image, it also tries to pull the image from tlcpackstaging/. on main, when it has done this and the build succeeds, it retags the image to tlcpack/. this allows anyone to submit an image to tlcpack without requiring a committer to manually retag.

// Pull image names from the results of should_rebuild_docker.py
if (env.USE_AUTOUPDATED_DOCKER_IMAGES == 'yes') {
ci_arm = sh(
script: "cat .docker-image.names/ci_arm",
Copy link
Contributor

Choose a reason for hiding this comment

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

need to be consistent with .gitignore (docker-image.names vs docker-image-names)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants