1

Trying to acquire the TensorFlow Object Detection API models in a Azure Notebooks but everything I try gives 403 Forbidden. No problems retrieving the files locally or on AWS.

import six.moves.urllib as urllib
url = 'http://download.tensorflow.org/models/object_detection/rfcn_resnet101_coco_11_06_2017.tar.gz'
opener = urllib.request.URLopener()
opener.retrieve(url)

I tried adding User-Agent data to the header etc but that failed. Tried using wget and that gave a 403 also. I think the notebooks run in a docker container so maybe some issue there. Any insight or work-arounds would be much appreciated.

brown.2179
  • 1,750
  • 1
  • 12
  • 15

1 Answers1

2

Azure Notebooks intentionally restricts access to external URLs. This is most likely to prevent people from using the Notebooks service to perform denial of service attacks to other sites.

https://blogs.technet.microsoft.com/machinelearning/2016/03/30/jupyter-notebooks-with-r-in-azure-ml-studio-2/

Access to external internet sites is restricted. However, we have white listed a number of important URLs:

  • All CRAN mirrors are on the white list, so you should be able to install packages using your favorite CRAN mirror.
  • Github is also white listed, meaning you can use devtools::install_github() to install packages that are not on CRAN, or get the development version of a package.
Soviut
  • 88,194
  • 49
  • 192
  • 260