Implement proper caching in VM builder v2 #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
--cache-dir
option tobuild
subcommand. If this option is not set, the default path will be used. On Linux this most likely will be$HOME/.cache/gvltctl
.$HOME/.linux-builds
to cache directory. Your$HOME/.linux-builds
is no longer needed and can be safely removed. Note that this will mean that your kernel will be re-built next time you run the tool.repository URL in base64
+version
. Kernel sources are stored inCACHE/linux-build/<url_base64_encoded>/<version>
directory. If this directory exists, the builder assumes, that there is a proper compiled kernel in it. So it will not re-compile it. It is safe to remove the whole directory, but modifying its content will have no effect.driver version
+kernel release
. Dumped driver is stored inCACHE/nvidia/<driver_version>/<kernel_release>
(driver version is hardcoded right now, because we only use one single version).CACHE/<crc32_of_content>.base.img
.platform + version
(platform is alwaysx86_64-unknown-linux-gnu
). Downloaded binary is stored inCACHE/mia/<platform>/mia-<version>
. If--mia-version latest
is used, it will be resolved to numeric before downloading and stored under numeric key. This way cache entry won't be outdated, if new MIA release will come.Notes
latest
version. It will cache the revision which was "latest" at the moment of cloning and won't update it. Probably it's no a huge deal.--mia-version latest
(which is used by default), there still will be a network request to check, which version is actually latest at the moment. It means that VM building still requires internet connection.