setup-miniconda icon indicating copy to clipboard operation
setup-miniconda copied to clipboard

Handle: Bundled Miniconda not found! and provide a warning and default installation

Open edgarriba opened this issue 4 years ago • 9 comments

hi! congrats for this package - it's really helpful.

we are using it in kornia for building our CI pipeline and we are facing some issues with the setup for a self-hosted device.

In particular we have the following error:

image https://github.com/kornia/kornia/runs/1448438566?check_suite_focus=true

The .yml used to define this workflow can be found here: https://github.com/kornia/kornia/blob/master/.github/workflows/tests_cuda.yml

Thanks in advance,

edgarriba avatar Nov 24 '20 15:11 edgarriba

Hi @edgarriba, thanks for the kind words and the report :)

So Github runners come with a bundled miniconda already installed on different locations (depending on the OS system) so your self hosted runners should have a miniconda available at the $CONDA environment variable.

In the meantime you could define an specific version of miniconda to use to force the download and install of miniconda (will take a bit longer, but it should solve the issue)

Something like:

        with:
          miniconda-version: "latest"

Could you please check?


This is a very specific use case, but maybe we could check for existence and then download if not found what do you @conda-incubator/setup-miniconda-team think?

goanpeca avatar Nov 24 '20 15:11 goanpeca

Not sure about the automated download. Which one would we default to? latest? Or should we try to provide the same as bundled?

The safest thing would be error + suggestion, I think? Like:

"Oops, $CONDA does not exist! Is this a self-hosted runner? You might want to use miniconda-version: "latest" option to automatically download and install latest one."

jaimergp avatar Nov 24 '20 15:11 jaimergp

@goanpeca worked like a charm - thanks so much for the help :)

edgarriba avatar Nov 24 '20 16:11 edgarriba

Glad to be of help @edgarriba.

Will open just to continue the discussion of what could be a good option for these cases :)

goanpeca avatar Nov 24 '20 16:11 goanpeca

Not sure about the automated download. Which one would we default to? latest? Or should we try to provide the same as bundled?

Good question... I guess we could raise a warning, like,

Bundled CONDA not found, downloading latest miniconda, if you want an specific version of miniconda, please use the miniconda-version: ... key.

The warning ensure they can either specifiy a version (which is a better solution) but be aware that something is out of the ordinary. But we can still function gracefully :)

goanpeca avatar Nov 24 '20 16:11 goanpeca

Wanna work on this one @jaimergp :) ?

goanpeca avatar Nov 24 '20 16:11 goanpeca

Sure. I'll wait until #107 et al are merged though!

jaimergp avatar Nov 24 '20 16:11 jaimergp

I encountered the same problem, and fixed it by supplying the CONDA env var, though I'd share. So part of the actions yaml looks like:

      ...
      - name: Setup Conda dependencies
        uses: conda-incubator/setup-miniconda@v2
        env:
          CONDA: /home/your_name/miniconda3
        with:
          activate-environment: your_conda
          environment-file: environment.yml
          python-version: 3.9.1
          auto-activate-base: false
      ...

kengz avatar Dec 14 '20 05:12 kengz

Hi @kengz thanks for sharing!

goanpeca avatar Dec 14 '20 16:12 goanpeca