Skip to content
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

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

Open
edgarriba opened this issue Nov 24, 2020 · 9 comments · Fixed by #187
Open
Assignees
Labels
type:enhancement New feature or request
Milestone

Comments

@edgarriba
Copy link

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,

@goanpeca
Copy link
Member

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?

@jaimergp
Copy link
Member

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."

@edgarriba
Copy link
Author

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

@goanpeca
Copy link
Member

Glad to be of help @edgarriba.

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

@goanpeca goanpeca reopened this Nov 24, 2020
@goanpeca
Copy link
Member

goanpeca commented Nov 24, 2020

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 goanpeca changed the title Error: Bundled Miniconda not found! Handle: Bundled Miniconda not found! and provide a warning and default installation Nov 24, 2020
@goanpeca goanpeca added the type:enhancement New feature or request label Nov 24, 2020
@goanpeca goanpeca added this to the v2.1.0 milestone Nov 24, 2020
@goanpeca
Copy link
Member

Wanna work on this one @jaimergp :) ?

@jaimergp
Copy link
Member

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

@kengz
Copy link

kengz commented Dec 14, 2020

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
      ...

@goanpeca
Copy link
Member

Hi @kengz thanks for sharing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants