Public Repository

Last pushed: a year ago
Short Description
Create your own Neural Styles image with a user-friendly GUI
Full Description

Container comes loaded with neural-style, an algorithm to combine the style of one image with the content of another, found here
Use the command

docker run -it --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" dorakorpar/nsgui:latest

to open a container, then


inside the container to open the GUI.
Currently only compatible with Linux systems.
Check out the source code here

Docker Pull Command

Comments (2)
a year ago

I got this to work on my Mac ( screenshot located here:

Things i have tried:

  1. Set the DISPLAY environment variable to different values (did not work)

  2. Set ForwardX11=yes in /etc/ssh/ssh_config (I know this is server and I think that the issue is client, but what the heck, let’s poke it and see) (did not work, did not expect it to)

  3. Googled “jessfraz X11 mount”, read her blog post here: and in that post she refers to tricks to get it to work on mac, so I used the message thread located here (worked)

What worked (solution #3):

(Update brew and brew cask)

  • brew update
  • Had to install cask - brew install brew-cask

— commands I ran from a terminal window
— install socat
brew install socat

--install xquartz
brew cask install xquartz

--<reboot - because the DISPLAY environment variable was not set>

--open Quartz server
open -a XQuartz

--start a socat session
socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

--in another (second terminal window) window
--use ifconfig to find out the IP address of the VirtualBox
ifconfig ( look for the IP address associated with vboxnet0 )

--run the container, setting the DISPLAY to the IP
docker run -it -e DISPLAY= dorakorpar/nsgui

a year ago

First, let me say I love the idea behind this. Apps inside containers is a powerful dream, even more so if we can get to a true cross-platform ideal. I was looking for a small project to play with and when I found the writeup on this it sounded fun. ( ) Thank you!

I am assuming that when you say "Currently only compatible with Linux systems." you mean that in the literal, and are not including the MAC as a "Linux system". I believe anyone who is successful at coding knows the value of precise wording and characters, every single character counts. ;-)

But I also like to experiment take things apart to see how they work. I tried to run this on my Mac for fun and games, and the first thing I found was that the DISPLAY environment variable was not being passed into the container (an $ env command confirmed this), so the _tkinter.create() function failed with this error message:

_tkinter.TclError: no display name and no $DISPLAY environment variable

Perhaps Docker has changed and empty environment variables are tossed out/not honored? Or perhaps the Docker flavor for Mac is "unique"? ;-)

I now better understand the part of the blog post where you detail issues with X11 and _tkinter.

I have tried a few things so far:

  1. $ export DISPLAY
    _tkinter.TclError: couldn't connect to display ""

  2. $ export DISPLAY=":0"
    _tkinter.TclError: couldn't connect to display ":0"

Here are my thoughts on "Things Still Left To Try":

  1. Keep reading up on the vagaries of Docker, tkinter, X11, etc. I suspect I am not catching the right X11 display because I am connected to a container and not local. It's been a long time since I played with XWindows, but this is the first thing i am going to try.

  2. Just build a true Linux VM and run from there. Might work, but there also could be issues with a Virtual Machine.

  3. Take an old computer and just load Linux on it. Also might work, but due to the the nature of Linux, distort selection, graphics card, X11 config, this also might be a long road.

  4. Ask for help. Hmm, not really in my nature, but it could work...

  • Ward