question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Micromamba + cache full example

See original GitHub issue

Hi, 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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
goanpecacommented, Aug 23, 2020

That makes sense. So if I want the fastest installs, would the following be my best bet:

Yes, but it may depend on the other items I mentioned before:

  • Time it takes to download
  • Time it takes to zip the package cache
  • Time it takes to unzip it,

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… 🤷

0reactions
adriangbcommented, Aug 23, 2020

Makes sense, I’ll have to test both ways!

Read more comments on GitHub >

github_iconTop Results From Across the Web

mamba-org/provision-with-micromamba - GitHub
Example with environment caching. Use cache-env to cache the entire Conda environment ( envs/myenv directory) across action runs. By default the ...
Read more >
Micromamba - Mamba's documentation!
micromamba supports a subset of all mamba or conda commands and implements ... an archive clean Clean package cache config Configuration of micromamba...
Read more >
Can't install pip dependencies - Robocorp Forum
Im trying to set the 2captcha-python lib as a dependency but can't get the environment to set up properly. Shouldn't I be able...
Read more >
Nextflow training
This guide complements the full Nextflow documentation - if you ever have any ... In this toy example, the script takes an input...
Read more >
d37f14344493 - Quay Container Registry · Quay
Includes full user management and history. ... RUN /bin/bash -c ln -s /bin/micromamba /bin/mamba && ln -s /bin/micromamba /bin/conda && ln -s ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found