floydhub / dl-docker

An all-in-one Docker image for deep learning. Contains all the popular DL frameworks (TensorFlow, Theano, Torch, Caffe, etc.)
https://www.floydhub.com
3.86k stars 818 forks source link

"no display name and no $DISPLAY environment variable" Ubuntu 16.04 #14

Closed andmib closed 8 years ago

andmib commented 8 years ago

Hey,

I'm running Docker in Ubuntu 16.04. I built our GPU-based container. When I run it with:

sudo nvidia-docker run -it -p 8888:8888 -p 6006:6006 floydhub/dl-docker:gpu bash

and then run any Tensor flow commands in iPython or Jupyter Notebook, for example:

# Import MINST data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/", one_hot=True)

I get the error:

TclError: no display name and no $DISPLAY environment variable

I've tried passing the container -e DISPLAY=$DISPLAY, but it says it can't find :0.

Any suggestions?

andmib commented 8 years ago

Apparently it was a problem with %paste in iPython, not specific to your docker file. Apologies.