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

"import torch" failed #1618

Closed
sherkwast opened this issue May 23, 2017 · 3 comments

Comments

Projects
None yet
4 participants
@sherkwast
Copy link

commented May 23, 2017

I installed pytorch and torchvision using pip on alpine container, then it gave the following error.

python3.5.2
ImportError: Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /usr/
lib/python3.5/site-packages/torch/_C.cpython-35m-x86_64-linux-gnu.so)

ipython
ImportError: Error relocating /usr/lib/python3.5/site-packages/torch/lib/libcudnn.so.6: __strtod_internal:
symbol not found

@soumith

This comment has been minimized.

Copy link
Member

commented May 23, 2017

Looks like libcudnn.so.6 (NVIDIA
s CuDNN library) links against glibc.
Alpine provides musl as it's standard library, which misses the symbol __strtod_internal which is glibc specific.
I am not sure what to do here other than try to page nvidia folks. cc: @ngimel to alert appropriate folks.

The first error: ImportError: Error loading shared library ld-linux-x86-64.so.2 seems to be an issue with your python installation and not pytorch itself.

Since either of these errors are not in our scope of fixing (1st is your python install, 2nd is a NVIDIA CuDNN issue, and CuDNN is a blackbox), I'll tag these as dependency bugs and close the issue.
If you do not plan to use GPUs, then you can install PyTorch from source on your machine without installing CUDA or CuDNN and it'll work for you. Instructions are here: https://github.com/pytorch/pytorch#from-source

@soumith soumith closed this May 23, 2017

@ngimel

This comment has been minimized.

Copy link
Contributor

commented May 25, 2017

Got an answer from cudnn that alpine is not supported and won't be supported.

@shabazpatel

This comment has been minimized.

Copy link

commented Aug 16, 2017

You can use this Dockerfile. This is built over ubuntu. You can also try using datmo in order setup environment and track machine learning projects for making models reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.