title: How do I load a local model with torch.hub.load?
body: <p>I need to avoid downloading the model from the web (due to restrictions on the machine installed).</p>
  <p>This works, but it downloads the model from the Internet</p>
  <pre><code>model = torch.hub.load('pytorch/vision:v0.9.0', 'deeplabv3_resnet101', pretrained=True)
  </code></pre>
  <p>I have placed the <code>.pth</code> file and the <code>hubconf.py</code> file in the /tmp/ folder and changed my code to</p>
  <pre><code>model = torch.hub.load('/tmp/', 'deeplabv3_resnet101', pretrained=True, source='local')
  </code></pre>
  <p>but to my surprise, it still downloads the model from the Internet. What am I doing wrong? How can I load the model locally?</p>
  <p>Just to give you a bit more details, I'm doing all this in a Docker container that has a read-only volume at runtime, so that's why the download of new files fails.</p>