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

Fails on self-hosted runner when micromamba already exists #164

Closed
artemisart opened this issue Oct 19, 2023 · 4 comments · Fixed by #179
Closed

Fails on self-hosted runner when micromamba already exists #164

artemisart opened this issue Oct 19, 2023 · 4 comments · Fixed by #179
Labels
enhancement New feature or request

Comments

@artemisart
Copy link

Hello, I tried using this action on a self-hosted runner where I don't want to install+uninstall mamba on each run to save time, is this planned to be supported someday? (should just skip if the env already exists)
Currently fails:

> Run mamba-org/setup-micromamba@v1
  with:
    environment-name: ci_py39
    create-args: python=3.9
Install micromamba
  Destination file path /home/ubuntu/micromamba-bin/micromamba already exists
  Waiting 11 seconds before trying again
  Destination file path /home/ubuntu/micromamba-bin/micromamba already exists
  Waiting 10 seconds before trying again
  Error: Error installing micromamba: Destination file path /home/ubuntu/micromamba-bin/micromamba already exists
Error: Destination file path /home/ubuntu/micromamba-bin/micromamba already exists

Current workaround: cannot use setup-micromamba@v1, install mamba outside of gha as I keep the same runner, and install + setup the env manually like this:

- name: Setup python env
  run: |
    env=ci_py39
    if ! mamba env list | grep --word-regexp --quiet $env; then
      mamba create -n $env python=3.9 --yes
    fi
    echo $(conda info --base)/envs/$env/bin >> $GITHUB_PATH
- name: Install package
  run: |
    pip install ...
@jonashaag
Copy link

How long does it take to install on your server?

@0xbe7a
Copy link
Contributor

0xbe7a commented Dec 5, 2023

I would also appreciate a option to use an already installed version of micromamba instead of downloading micromamba for each run. In the self-hosted runner scenario environment i am running in, i have very restricted network access and would like to avoid external traffic completely.

@pavelzw
Copy link
Member

pavelzw commented Dec 5, 2023

I think having an explicit option

use-from-path: true

that skips downloading could work. I'll take a look at it.

@pavelzw pavelzw added the enhancement New feature or request label Dec 5, 2023
@pavelzw
Copy link
Member

pavelzw commented Dec 5, 2023

@artemisart please use

- uses: mamba-org/setup-micromamba@v1
  with:
    download-micromamba: false
    micromamba-binary-path: /path/to/micromamba # optional if micromamba is on PATH

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

Successfully merging a pull request may close this issue.

4 participants