-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use conda-lock
to speed up builds
#12
Comments
Winter Break UpdateThe second example in that link above does pretty much exactly what we want. It uses something called multi-stage builds to create the conda environment in a slimmed down linux container so that the built conda environment can be copied into a separate container later on. Unfortunately, it isn't clear whether each stage in a multi-stage build will be cached separately. Apparently, there is a way to do this, but I tried it and it didn't work. I got an error in the build stage:
Luckily I found this comment that seems to explain how to get it to work in Github actions. The key is to create different cache folders for each stage. I don't have time to try this right now - but this should be the next thing to look into. According to the |
another thing I just realized is that deletion of the cache will also "unlock" our locked envs, since our current design only stores the lock files in the cache and not in our github repo to ensure that this doesn't happen, we could consider exporting the lock file out of the build container using the
This way, the files in the root directory of our container should be copied into a resources |
Our conda environments are re-solved upon each build but, in theory, a re-solve is only necessary when a yml environment file changes.
conda-lock
to create lock files for each yml file, and we should make sure to cache themSee also this description of how to use
conda-lock
with Docker.The text was updated successfully, but these errors were encountered: