-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
torchvision
breaks in official pytorch
Docker image: RuntimeError: Couldn't load custom C++ ops.
#4222
Comments
In case anyone else struggles with this, the workaround I'm using is to start with the base The beginning of my Dockerfile looks like this:
|
Having the same issue with 1.9.0-cuda11.1-cudnn8-runtime |
Yes, same for me. Cc @seemethere |
FYI: I was able to get torchvision to work using the RUN pip3 install \
torchvision==0.10.0+cu111 \
-f https://download.pytorch.org/whl/torch_stable.html |
In my case, the workaround is to uninstall pip uninstall torchvision
pip install torchvision |
I can not reproduce the problem using 1.10.0-cuda11.3-cudnn8-runtime
Also, please note, that torchvision is already pre-installed in the container, so running something like
Produces the same result. Closing. Please do not hesitate to reopen a new one if it will be reproduced in new builds |
@malfet This issue still exists in To reproduce: docker run -it --gpus all pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime python -c "import torchvision;torchvision.ops.nms(None, None, 0.0)" Produce error messages:
|
🐛 Bug
I'm using the pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime Docker image and trying to install
torchvision
on top. The installation proceeds as expected, but if I try to call a function that uses custom C++ ops (such astorchvision.ops.nms
), I get the following error message:I can confirm that the installed versions are compatible by bashing into the container and opening a Python prompt:
This issue occurs regardless of if I install pytorch by:
pip
, i.e.,RUN pip install torchvision
conda
without a version pin, i.e.,RUN conda install -c pytorch torchvision
conda
with a version pin, i.e.,RUN conda install -c pytorch torchvision=0.10.0
To Reproduce
Steps to reproduce the behavior:
In a new directory:
Dockerfile
with the following content:test.py
with the following content:Expected behavior
I expect to be able to load custom C++ ops, because
torch
1.9.0 andtorchvision
0.10.0 are marked as compatible in torchvision's compatibility matrix.In a working environment, the output of
test.py
looks like this:(Yes, this is still an error, but it at least demonstrates that _assert_has_ops is successful.)
Environment
Output of running
collect_env.py
inside the Docker container:The text was updated successfully, but these errors were encountered: