Micromamba + cache full example
See original GitHub issueHi, I’m trying to get the absolute fastest times, especially on windows. I see that over at mamba, micromamba is soon going to support windows soon (link) and support for installing form files at some point (https://github.com/TheSnakePit/mamba/issues/461). It would be really cool to be able to use this action + cache + micromamba for what I assume is going to be blazing fast installs. Once they get windows working (or maybe before) it would be great to get support and a full example of that combination here.
I would imagine this would look something like this:
- name: Cache conda/mamba
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: conda-${{ runner.os }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('test-env.yml') }}
- name: Setup micromamba
uses: goanpeca/setup-miniconda@v1
with:
channels: conda-forge
activate-environment: test
micromamba-version: "*"
use-only-tar-bz2: true # requried for caching
environment-file: test-env.yml
- name: Show conda environment
shell: bash -l {0}
run: |
micromamba list
Hopefully this would the first run download and install micromamba
and then use micromamba
to install the test
environment using test-env.yml
.
Subsequent runs would then use micromamba
from the cache (i.e. no need to re-download and re-install micromamba
since it’s a single file) and just activate/update the test
env.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top GitHub Comments
Yes, but it may depend on the other items I mentioned before:
Depending on how small/big your env is, it might be worth to cache, or it may not be worth it. And I do not have a rule of thumb… 🤷
Makes sense, I’ll have to test both ways!