You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can reproduce the problem with docker see below. Note that I tried on various computers (outside of docker) and it sometime works. It's not clear why, but maybe having a NVIDIA graphics card or GPU is enough for 'import torch' to work without error.
I can reproduce it with docker, the Dockerfile is based on Ubuntu 16.04, downloads the miniconda installer and installs pytorch with conda from the defaults channel.
Dockerfile
FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install curl -y
RUN curl -o miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash miniconda.sh -f -b -p /opt/anaconda && \
/opt/anaconda/bin/conda clean -tipy && \
rm -f miniconda.sh
ENV PATH /opt/anaconda/bin:$PATH
RUN conda install --yes python=3.7 pytorch=1.0.1
docker build . -t test && docker run -it test python -c 'import torch'
Output:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/anaconda/lib/python3.7/site-packages/torch/__init__.py", line 102, in <module>
from torch._C import *
ImportError: /opt/anaconda/lib/python3.7/site-packages/torch/lib/libtorch.so.1: undefined symbol: nvrtcGetProgramLogSize
I updated PyTorch to 1.1.0 yesterday. These new packages should work on system without a GPU, although slower than if you have a GPU available. PyTorch has had this ability in previous releases as well but some of the flags that are used to build the packages in the anaconda package repository can interfere with this feature.
Actual Behavior
python -c 'import torch'
causes the following error:According to pytorch/pytorch#2091 (comment)
I can reproduce the problem with docker see below. Note that I tried on various computers (outside of docker) and it sometime works. It's not clear why, but maybe having a NVIDIA graphics card or GPU is enough for 'import torch' to work without error.
If I understand correctly conda-forge/pytorch-cpu-feedstock#7 (comment)
pytorch
fromdefaults
channel should work without a GPU so I guess this feels like an unexpected error.Expected Behavior
python -c 'import torch'
succeeds without error.Steps to Reproduce
I can reproduce it with docker, the
Dockerfile
is based on Ubuntu 16.04, downloads the miniconda installer and installs pytorch with conda from thedefaults
channel.Dockerfile
Output:
Anaconda or Miniconda version:
PyTorch 1.0.1
Operating System:
Ubuntu 16.04
conda info
conda list --show-channel-urls
Work-arounds:
pytorch-cpu
fromconda-forge
free
channel which is probably not recommended.pytorch
channel works too which would indicate this is not a problem in PyTorch per se but more a packaging problemThe text was updated successfully, but these errors were encountered: