snowzach / doods2

API for detecting objects in images and video streams using Tensorflow
MIT License
221 stars 28 forks source link

Use newer tensorflow image to be compatible with torch version #94

Closed turley closed 10 months ago

turley commented 10 months ago

This should fix #92, which appears to be caused by a mismatch between versions of CUDA (in the tensorflow -gpu image) and torch.

The Dockerfile is using a specific version of tensorflow (2.7.0 in this case) that contains an older version of CUDA, whereas torch is being installed without specifying a version – so it's installing the latest, which relies on a newer version of CUDA.

As a workaround for the currently-published snowzach/doods2:amd64-gpu image, you can downgrade torch in the image with something like:

pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113

It might be a good idea to specify the torch version (in the Dockerfile) in the future, but I guess that's up to the project maintainer.

snowzach commented 10 months ago

Thanks!