running the web demo

961 views
Skip to first unread message

tomer...@mail.huji.ac.il

unread,
Jan 18, 2016, 4:37:47 PM1/18/16
to CMU-OpenFace
Hello,
I'm new to linux, and running ubuntu through virtualbox.
I followed the installation guidelines of docker, and of openface as well.
Nevertheless, when trying to run the web demo, I can't access "localhost:8000" or "localhost:9000" through firefox/chrome browser.
this is what I get:
2016-01-18 20:53:19+0000 [-] Log opened.
2016-01-18 20:53:19+0000 [-] WebSocketServerFactory starting on 9000
2016-01-18 20:53:19+0000 [-] Starting factory <autobahn.twisted.websocket.WebSocketServerFactory object at 0x7faf4b729210>

After that, I try to get into firefox/chrome and run "localhost:8000" but unfortunately I can't get anything. browser is working and saying "waiting to localhost" and then that's it...

do you any idea how I should proceed?
any idea would be very very helpful, I'm getting frustrated.

Thanks alot!
T.

Brandon Amos

unread,
Jan 18, 2016, 5:10:45 PM1/18/16
to tomer...@mail.huji.ac.il, CMU-OpenFace
Hi Tomer,

> I'm new to linux, and running ubuntu through virtualbox.
> I followed the installation guidelines of docker, and of openface as well.
> Nevertheless, when trying to run the web demo, I can't access
> "localhost:8000" or "localhost:9000" through firefox/chrome browser.

Do I understand correctly that you're running OpenFace in Docker in a VM?
Where is the browser you're trying to access it from?
On your host or in the VM?

The networking in the web demo in this scenario can be tricky to set up,
especially if you're trying to use a webcam.
It's simplest if you can use your webcam from the browser inside of
your VM.

The Docker container will start an HTTP server on port 8000 and a
WebSocket server on port 9000.
To access them from the VM, you need to find the IP address of the
Docker container and use that instead of localhost.
Once you find the IP address, you should be able to use a browser in
your VM to make sure you can connect to the HTTP server at
`http://docker-ip:8000`.
However, the demo probably won't work if you're using Chrome
because of https://github.com/cmusatyalab/openface/issues/75.

Let me know if you're able to connect to the HTTP server
and I can advise you on next steps.

-Brandon.
signature.asc

Tomer Behor

unread,
Jan 18, 2016, 6:30:45 PM1/18/16
to Brandon Amos, CMU-OpenFace
Hi Brandon,
thanks alot for you answer!
We managed to run the demo and it works great (And it's really cool)

However, we would like to edit the html file (index.html)
Is there any possible way to do it, considering that we installed everything through "automated docker build" as described in the setup?
we tried to enter the folder in which this file is located (in var/lib ect and then to the string in root@SOMESTRING which is shown up in the terminal after doing the "docker run.." command) and change the index.html file there. however, when opening the page again, the changes did not appear.

I will be very happy if you could help us in this issue. It's probably pretty simple, but we can't get on it. Maybe you could instruct us, or direct us to some resources.
Sorry if it's not the most relevant to this forum (though it might help somebody like me in the future..)

Cheers
T.

Tomer Behor

unread,
Jan 18, 2016, 6:44:18 PM1/18/16
to Brandon Amos, CMU-OpenFace
Ok nevermind we made a mistake and it worked when changing the file in this directory

Thanks again for your help and for the impressive project!
T.

Brandon Amos

unread,
Jan 18, 2016, 9:19:29 PM1/18/16
to Tomer Behor, CMU-OpenFace
Hi Tomer,

Great! Glad you were able to get running and editing working.

For editing files in the Docker container, you might find
https://tmux.github.io/ useful so you can have your text editor
in one window and a shell with OpenFace start-servers.sh open in another.

-Brandon.
signature.asc

Scott Winterringer

unread,
Jan 26, 2016, 6:34:32 PM1/26/16
to CMU-OpenFace, tomer...@mail.huji.ac.il, ba...@cs.cmu.edu
The Docker container will start an HTTP server on port 8000 and a 
WebSocket server on port 9000. 
To access them from the VM, you need to find the IP address of the 
Docker container and use that instead of localhost. 
Once you find the IP address, you should be able to use a browser in 
your VM to make sure you can connect to the HTTP server at 
`http://docker-ip:8000`. 
However, the demo probably won't work if you're using Chrome 
because of https://github.com/cmusatyalab/openface/issues/75

how do I get this information in a simple manner, this seems to be a whole process just to get the docker ip.
I'm running ubuntu 14.04 in a vmware vm with docker to run openfaces 

Brandon Amos

unread,
Jan 26, 2016, 7:47:50 PM1/26/16
to Scott Winterringer, CMU-OpenFace, tomer...@mail.huji.ac.il
Hi Scott,

> how do I get this information in a simple manner, this seems to be a whole
> process just to get the docker ip.
> I'm running ubuntu 14.04 in a vmware vm with docker to run openfaces

Are you asking how to get the IP address of a Docker container?
If so, you can use Docker's inspect tool:
https://docs.docker.com/engine/reference/commandline/inspect/

-Brandon.
signature.asc

Tomer Behor

unread,
Jan 27, 2016, 6:48:15 AM1/27/16
to Brandon Amos, Scott Winterringer, CMU-OpenFace
Hi,
not that I can help you alot - but just to let you know that on one computer it worked to use the regular localhost:8000... (in the other computer didn't work) so don't forget to try that one (though I guessed you tried already..)

Good luck
Tomer

Scott Winterringer

unread,
Feb 1, 2016, 3:45:30 AM2/1/16
to CMU-OpenFace
I tried to run it straight out of the box based on; https://cmusatyalab.github.io/openface/setup/
admittedly I am new to docker and find the usage overly complicated for many uses, getting a docker ip is one of them.

BEGIN; rant

(docker inspect all or *.* would be too easy right? and why a random ip in the subnet? dockers main function is fantastic but usage.. is very "unweildly")
so I'm going to wing it and assume based on your instructions the image is named; openface
nope
the image is named; bamos/openface
based on a github style checkout system
so the command is docker inspect; bamos/openface
of which I am presented a ugly descriptor of things I dont care about. 

Listing containers

I find what I'm looking for with no useful description.... WTH
END; rant

TL:DR ver;
save yourself a rusty spork to the eyes,
run the docker image with a IP already bound locally and root only access how idk docker documentation is a pain....

but this command is very very useful run as root "docker ps"
this command will give you running docker images ip addresses and ports
T.I tried to run it straight out of the box based on; https://cmusatyalab.github.io/openface/setup/
admittedly I am new to docker and find the usage overly complicated for many uses, getting a docker ip is one of them.


BEGIN; rant


(docker inspect all or *.* would be too easy right? and why a random ip in the subnet? dockers main function is fantastic but usage.. is very "unweildly")
so I'm going to wing it and assume based on your instructions the image is named; openface
nope
the image is named; bamos/openface
based on a github style checkout system
so the command is docker inspect; bamos/openface
of which I am presented a ugly descriptor of things I dont care about.


END; rant


TL:DR ver;
save yourself a rusty spork to the eyes,
run the docker image with a IP already bound....



docker pull bamos/openface
docker run -p 9000:9000 -p 8000:8000 -t -i bamos/openface /bin/bashdocker run -h tcp://127.0.0.1:9000 -h tcp://127.0.0.1:8000 -t -i bamos/openface /bin/bashcd /root/src/openface
./demos/compare.py images/examples/{lennon*,clapton*}
./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pkl ./images/examples/carell.jpg
./demos/web/start-servers.sh

Scott Winterringer

unread,
Feb 1, 2016, 3:58:14 AM2/1/16
to CMU-OpenFace
that formatting.... of spoiler text and no edit ability

Abhiprae Choudhury

unread,
Feb 2, 2018, 3:42:21 PM2/2/18
to CMU-OpenFace
Hi Brandon,

I am trying to run open face web demo manually but when I open localhost after running the servers.sh file, it shows unable to connect.

How to solve this ?
Reply all
Reply to author
Forward
0 new messages