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

miniconda image does not install from environment.yml #971

Open
tvoipio opened this issue Feb 19, 2024 · 2 comments
Open

miniconda image does not install from environment.yml #971

tvoipio opened this issue Feb 19, 2024 · 2 comments

Comments

@tvoipio
Copy link

tvoipio commented Feb 19, 2024

### [Optional] Adding the contents of environment.yml to the image

Running VS Code 1.86.0 with Dev Containers v0.338.1.

Including an environment.yml does not actually update the base environment when the dev container is rebuilt, when .devcontainer/devcontainer.json is the following:

{
	"name": "Python 3",
	"image": "mcr.microsoft.com/devcontainers/miniconda:0.203-3"
}

This seems logical in retrospect, as the local environment.yml has not been present when the image is built.

@samruddhikhandale
Copy link
Member

Hi 👋

Thanks for reporting!

@gauravsaini04 Can you take a look and investigate this issue? Thanks!

@samruddhikhandale
Copy link
Member

This seems logical in retrospect, as the local environment.yml has not been present when the image is built.

@tvoipio Yes, your understanding is correct.

If you want to update the base environment when the dev container is rebuilt, you need to specify the postCreateCommand in the devcontainer.json file to update the environment using the environment.yml file.

{
	"name": "Python 3",
	"image": "mcr.microsoft.com/devcontainers/miniconda:0.203-3",
         "postCreateCommand": "conda env update --file environment.yml"
}

Let us know if you are running into any issues, thanks!

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