ghost icon indicating copy to clipboard operation
ghost copied to clipboard

Colab no longer working

Open adamgeddon1686 opened this issue 2 years ago • 5 comments

Google colab has upgraded the default python runtime to 3.10 and that makes the version of onnxruntime incompatible. I tried just upgrading onnxruntime but that didn't work because of a changes to onnxruntime from version 1.8 to anything beyond that. I am attempting a workaround by using the fallback runtime but eventually it won't work anymore. The only solution long term seems to be to either upgrade the inference to work with a different version of onnx or to rebuild onnx to work on python 3.10. I am also reaching out to the people behind onnx to see if this is possible.

adamgeddon1686 avatar Apr 29 '23 12:04 adamgeddon1686

I actually got it to work by using the fallback runtime that has python 3.9 by running "Use fallback runtime version" from the command palette. Then you have to make sure to re-enable the GPU and it should work. But this will only be a temporary fix since the fallback runtime will eventually be phased out. According to their documentation, sometime in may. The best solution would be to make this to work with a newer version of onnxruntime-gpu that is compatible with later versions of python. But that is beyond my capabilities. Alternative, you could make a version of onnx that runs on the newer versions of python. If not, this will stop working on colab in a few weeks.

adamgeddon1686 avatar Apr 29 '23 14:04 adamgeddon1686

I have the same problem

ak3389 avatar May 01 '23 16:05 ak3389

It really boils down to a single command which no longer works which is

!pip install onnxruntime-gpu == 1.8

This is because this version of onnxruntime-gpu 1.8 isn't compatible with python 3.10 and there is a major change from v1.8 to future version which would require a rewrite of the code in the notebook.

adamgeddon1686 avatar May 04 '23 02:05 adamgeddon1686

Hi @adamgeddon1686, @ak3389! Error fixed, colab should work now.

AlexanderGroshev avatar May 04 '23 20:05 AlexanderGroshev

now colab give error colab error OSError: libcudart.so.11.0: cannot open shared object file: No such file or directory

loboere avatar Dec 23 '23 00:12 loboere