gramineproject / examples

Sample applications configs for Gramine
BSD 3-Clause "New" or "Revised" License
29 stars 22 forks source link

Allow new- and old-style download of models in PyTorch example #56

Closed dimakuv closed 1 year ago

dimakuv commented 1 year ago

Previous commit "Fix deprecation warning in PyTorch example" (https://github.com/gramineproject/examples/commit/2e41bcd1d1887a364fced4bd220e654c9ae41ff0) broke the PyTorch example on Ubuntu 18.04, CentOS 8, RHEL 8, etc. Changes in that commit work with torchvision 0.13.0+ which is available with Python 3.7+ only, however e.g. Ubuntu 18.04 comes with Python 3.6, hence torchvision 0.13.0+ cannot be installed on Ubuntu 18.04.

To allow such older OS distros, this PR allows both styles of downloading models.

Fixes #53. Closes #55.


This change is Reviewable