Docker running Jupyter Notebook – `'no $DISPLAY environment variable'?

I am running a Docker container with Jupyter Notebook using:

sudo nvidia-docker run -it -v /media/files:/files -p 8888:8888 -p 6001:6001 mybigdocker:latest

  • Dockerfile COPY file into right container
  • node.JS application in docker container
  • Connecting to a headless nREPL running in a Docker container from another container
  • Vagrant Error in Centos
  • Cluster of forward proxies
  • No value has been specified for property 'imageId' while creating container
  • And then connecting to it at in Chrome.

    Everything works fine, except if I try to do anything with matplotlib, or any type of non-text output, where I get the error:

    TclError: no display name and no $DISPLAY environment variable

    I have tried adding --env="DISPLAY" and --env=$DISPLAY and --env=":0" with no avail.

    How do I fix this?

  • Run tests inside Docker container with Jenkins
  • Ubuntu 14.04 volume disk full due to docker data
  • Connection Refused for Spark on Docker
  • Passing parameter in docker build command with fish
  • How do I deploy this docker app on digital ocean?
  • docker-machine ssh on AWS
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.