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

  • Using Docker and haproxy in order to load balance requests to multiple instances of embedded tomcat
  • Testing Mongo with Docker
  • Networking in Docker Swarm, and why we need a proxy
  • Developing Puppet locally using Vagrant + Docker
  • kpm restore unable to find System.Net.Http
  • How is digest of Docker image calculated?
  • 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?

  • Serving static files directly via a containerized front-end web server?
  • Using Jenkins Blue Ocean to Deploy builds
  • SparqlVerse issue with Docker
  • In docker, writing file to mounted file-system as non-root?
  • Server Error when logging in to a private docker registry from docker in docker
  • webdriver container in circleci for testing
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.