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

Add pytorch to ML image (or create separate image) #312

Closed
rabernat opened this issue Apr 26, 2022 · 7 comments · Fixed by #315
Closed

Add pytorch to ML image (or create separate image) #312

rabernat opened this issue Apr 26, 2022 · 7 comments · Fixed by #315

Comments

@rabernat
Copy link
Member

For LEAP and M2LInES 2i2c Hubs, many researchers will want to use pytorch. Unfortunately, this image does not have pytorch.

When I try to add pytorch-gpu to ml-notebook/environment.yml and call

conda-lock lock --mamba -f environment.yml -f ../pangeo-notebook/environment.yml -p linux-64

I get the error

Encountered problems while solving.
Problem: nothing provides __glibc >=2.17,<3.0.a0 needed by pytorch-1.10.0-cuda102py37h689c94d_1

I found a similar problem in NVIDIA/MinkowskiEngine#354. That issue implies we may need to mix conda channels to get this to work. The workaround they recommend is to install openblas from anaconda and then switch to conda-forge for pytorch.

Any thoughts on the best path here?

cc @yuvipanda

Also related to #188

@ngam
Copy link
Contributor

ngam commented Apr 27, 2022

Encountered problems while solving.
Problem: nothing provides __glibc >=2.17,<3.0.a0 needed by pytorch-1.10.0-cuda102py37h689c94d_1

Could you try to force later pytorch and/or higher cudatoolkit? This error is likely related to the underlying image you're using (or the machine). __glibc <2.17 is pretty old :(

The openblas addition (at least for recent pytorch versions from conda-forge) likely makes no difference because pytorch uses mkl, not openblas, if I understand correctly.

You can also try to see the torch config: torch.__config__.show()

@ngam
Copy link
Contributor

ngam commented Apr 27, 2022

Or are you trying this on a personal machine. I will test it quickly to test why this is happening.

@ngam
Copy link
Contributor

ngam commented Apr 27, 2022

@rabernat the error is coming from this: https://github.com/conda-forge/pytorch-cpu-feedstock/blob/93333de760d702aee276dcafeedc890458a00417/recipe/meta.yaml#L34

Something is forcing __glibc <2.17. I will look more closely at this later. It is probably also holding up other packages from getting upgraded. Quite a few packages moved to __glibc >=2.17 on conda-forge.

@ngam
Copy link
Contributor

ngam commented Apr 27, 2022

Paging @hmaarrfk who may be able to advise on this situation. Odd because the successful image ends up being 1.10.2 and pulling glibc 2.17 if you look closely at the CI.

@hmaarrfk
Copy link

It seems that you are using ubuntu images with 20.04 though. So I'm really not sure.

@ngam
Copy link
Contributor

ngam commented Apr 27, 2022

Yep, I would guess it is a simpler conflict between packages somehow that may need to be sorted out manually. Thanks a lot @hmaarrfk and sorry for bothering you with this here!

@hmaarrfk
Copy link

Can you check the output of

conda info

before running any other conda commands?

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

Successfully merging a pull request may close this issue.

3 participants