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

envFile for devcontainer-features/micromamba => update base instead of create new env #25

Open
nick-youngblut opened this issue Jan 5, 2024 · 7 comments

Comments

@nick-youngblut
Copy link

It would be great to just be able to update the base environment versus having to create a new conda env via envFile.
It appears that micromamba does not include micromamba env update, unlike conda or mamba.

Moreover, I'm using:

        "ghcr.io/mamba-org/devcontainer-features/micromamba": {
            "version": "latest",
            "envFile": "environment.yml"
        }

in my devcontainer.json file, but the environment is not created, and there is no warning (e.g., "environment.yml file not found"). Running micromamba env create -y -f environment.yml runs successfully and creates the new environment.

I'm using micromamba v1.5.6.

@maresb
Copy link
Collaborator

maresb commented Jan 5, 2024

Hi @nick-youngblut!

Is this two separate issues?

  1. Feature request: Implement update instead of create.
  2. Bug: Environment creation silently fails.

@nick-youngblut
Copy link
Author

Sorry, I got a bit lazy with this issue. It started out as a feature request, and then I noticed the potential bug.

@maresb
Copy link
Collaborator

maresb commented Jan 7, 2024

No worries, I was just a bit confused.

I don't think the devcontainer feature can do much to work around the lack of micromamba env update, unless you have any ideas.

Could you share your environment.yml so that I can attempt to reproduce the problem?

@nick-youngblut
Copy link
Author

My environment.yml:

name: my_conda_env
channels:
  - conda-forge
  - bioconda
dependencies:
  - docopt>=0.6.2
  - numpy>=1.10
  - pandas>=0.18
  - scipy>=0.17
  - configobj=5.0.8
  - biopython=1.82
  - art=2016.06.05
  - pyfastx=2.0.2
  - fqtools=2.0
  - simlord=1.0.4
  - nanosim-h=1.1.0.4

Thanks for your help!

@maresb
Copy link
Collaborator

maresb commented Jan 7, 2024

Hmm, we should be failing when the environment file isn't found. I'd make sure the environment.yml file is copied in your Dockerfile and try specifying the absolute path in the Docker image.

We probably need better documentation.

@QuLogic
Copy link

QuLogic commented Aug 22, 2024

Hmm, we should be failing when the environment file isn't found. I'd make sure the environment.yml file is copied in your Dockerfile and try specifying the absolute path in the Docker image.

I'm pretty sure this ignores non-existent environment files without error.

@maresb
Copy link
Collaborator

maresb commented Aug 22, 2024

Ya, we probably want something like

else
    echo "ERROR (micromamba dev container feature): unable to find micromamba environment file ${ENV_FILE}"
    exit 1
fi

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

No branches or pull requests

3 participants