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

Install Miniforge in a docker container #617

Closed
nikfio opened this issue Jul 30, 2024 · 5 comments
Closed

Install Miniforge in a docker container #617

nikfio opened this issue Jul 30, 2024 · 5 comments
Labels
question Further information is requested windows

Comments

@nikfio
Copy link

nikfio commented Jul 30, 2024

Comment:

Hello everyone,

for pipeline design purposes, I would like to build an image based on Linux and one based on Windows.
I always use MIniforge in my development computer and what I want is try to innstall it also in containers.

While on a Linux based image everything runs smoothly, I can't install MIniforge on a Windows based container.

Here are the steps I went through:

  1. download a windows image with powershell

docker pull m365pnp/powershell:1.10.0-nanoserver-1809

  1. run the container and spawn a powershell

docker run -it m365pnp/powershell:1.10.0-nanoserver-1809 pwsh

  1. download miniforge installation esecutable inside the container

curl -L -O -k "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Windows-x86_64.exe"

  1. Run installation

Start-Process "C:\Miniforge3-Windows-x86_64.exe" -ArgumentList "/S /D=C:\Miniforge3" -NoNewWindow -Wait

By launching the last step command It actually does nothing, no output and no installation performed.

Do you have any idea on the matter? Did you follow other ways to build a pipeline with windows based images?

Many thanks,
Nick

@nikfio nikfio added the question Further information is requested label Jul 30, 2024
@jaimergp
Copy link
Member

Maybe you are luckier with cmd? Check this function in constructor or this CI line in napari.

@jakirkham
Copy link
Member

jakirkham commented Jul 31, 2024

Also would checkout the miniforge-images repo

Edit: Or previous attempts to create Windows containers ( conda-forge/docker-images#209 )

@nikfio
Copy link
Author

nikfio commented Aug 1, 2024

Hi guys,

Thank you for the suggestions.
I tried @jaimergp cmd option but it was not successful.

I went through with a not so good workaround:

  1. downloaded Miniforge exe installer on my development PC
  2. run miniforge command line installation with "/S /D=C:\Miniforge3" arguments
  3. Copied the C:\Miniforge3 folder content inside the windows container
  4. saved container as a new image
  5. run the new image with interactve powershell, navigate to miniforge folder and then Scripts folder, run conda.exe init
  6. resaved to a new image with docker commit
  7. Restarted the image and the command mamba --version gave output ok
  8. Tested by running python and some mamba update commands

Hope it would help anyone in a similar situation.

Thanks,
Nicola

@nikfio nikfio closed this as completed Aug 1, 2024
@jaimergp
Copy link
Member

jaimergp commented Aug 1, 2024

As long as the path inside the Docker container is the same as in the original installation path (C:\Miniforge3), you should be fine!

@nikfio
Copy link
Author

nikfio commented Aug 1, 2024

Got it, thank you for the clarification.

Nick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested windows
Development

No branches or pull requests

4 participants