Advice for how to cache the conda installation?
See original GitHub issueWe use this action for Manubot, see workflow and example build. It’s great, thanks for making it! Our current configuration is:
- name: Install Environment
uses: goanpeca/setup-miniconda@v1
with:
activate-environment: manubot
environment-file: build/environment.yml
auto-activate-base: false
miniconda-version: 'latest'
In https://github.com/manubot/rootstock/pull/316, I’m looking into using actions/cache
to cache a directory of data created during action runtime.
However, the slowest part of our build is often installing the conda environment, which currently takes about 100 seconds of the 200 second total time. So I was wondering if the conda environment would be cacheable.
For example what about the following:
- name: Cache Conda
id: cache-conda
uses: actions/cache@v1
with:
path: WHAT_GOES_HERE
key: conda-cache-${{ hashFiles('build/environment.yml') }}
- name: Some conditional set here?
if: steps.cache-conda.outputs.cache-hit != 'true'
uses: goanpeca/setup-miniconda@v1
Basically our goal is use a pre-existing conda installation unless our environment.yml specification is changed. @goanpeca does that sound like a good idea? Any advice on what directory we should cache and how to configure this action to use a cached directory?
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (8 by maintainers)
Top GitHub Comments
Correct do not specify miniconda versión at all and dont activate the conda autoupdate version. That will use all that is installed with the container.
what is the guideline to enable cache? From my understanding, don’t specify miniconda to latest, right