urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

when I try:

salloc --nodes=1 --gres=gpu:k40:1 --mem=32GB --time=0:10:00
module load gcc
module load cuda/10.1.243
module load cudnn/
module load python

import tensorflow_hub as hub
from six.moves.urllib.request import urlopen
module_handle = “https://tfhub.dev/google/openimages_v4/ssd/mobilenet_v2/1
detector = hub.load(module_handle).signatures[‘default’]

I get the urllib error. When I try these same exact commands from the login node, they run without errors. However, I need to utilize GPUs. Any ideas why this is happening?

We don’t allow internet access from compute nodes. Are you able to download in advance and have your program access locally?