openai / universe-starter-agent

A starter agent that can solve a number of universe environments.
MIT License
1.1k stars 318 forks source link

unable to view agent's environment through vnc => persisting docker images? #131

Closed a1noack closed 6 years ago

a1noack commented 6 years ago

I know there are a couple of other github issues describing similar problems, but I was unable to resolve my problem with their advice. (Or maybe I simply didn't follow their advice correctly.. I'm not sure. I'm new to all of this.)

My problem is I can't view my agent's environment through VNC using open vnc://localhost:5900

When I run the train.py file from the universe-starter-agent directory, everything appears to work fine. The tensorboard screen at http://localhost:12345 seems to be very active.
However, when I attempted to see the agent's environment through VNC by executing the mac terminal command open vnc://localhost:5900 (I also tried port numbers 5901, 5902, etc.), I was greeted with an error message saying "You cannot control your own screen." When I tried to open through port 5900 and was greeted with the error message "Connection failed to 'localhost'" when I tried any of the other ports (5901-590x).

(universe-starter-agent) Adams-MacBook-Pro-4:universe-starter-agent adamnoack$ python train.py --num-workers 2 --env-id flashgames.NeonRace-v0 --log-dir /tmp/neonrace
Executing the following commands:
mkdir -p /tmp/neonrace
echo /Users/adamnoack/anaconda/envs/universe-starter-agent/bin/python train.py --num-workers 2 --env-id flashgames.NeonRace-v0 --log-dir /tmp/neonrace > /tmp/neonrace/cmd.sh
kill $( lsof -i:12345 -t ) > /dev/null 2>&1
kill $( lsof -i:12222-12224 -t ) > /dev/null 2>&1
tmux kill-session -t a3c
tmux new-session -s a3c -n ps -d bash
tmux new-window -t a3c -n w-0 bash
tmux new-window -t a3c -n w-1 bash
tmux new-window -t a3c -n tb bash
tmux new-window -t a3c -n htop bash
sleep 1
tmux send-keys -t a3c:ps 'CUDA_VISIBLE_DEVICES= /Users/adamnoack/anaconda/envs/universe-starter-agent/bin/python worker.py --log-dir /tmp/neonrace --env-id flashgames.NeonRace-v0 --num-workers 2 --job-name ps' Enter
tmux send-keys -t a3c:w-0 'CUDA_VISIBLE_DEVICES= /Users/adamnoack/anaconda/envs/universe-starter-agent/bin/python worker.py --log-dir /tmp/neonrace --env-id flashgames.NeonRace-v0 --num-workers 2 --job-name worker --task 0 --remotes 1' Enter
tmux send-keys -t a3c:w-1 'CUDA_VISIBLE_DEVICES= /Users/adamnoack/anaconda/envs/universe-starter-agent/bin/python worker.py --log-dir /tmp/neonrace --env-id flashgames.NeonRace-v0 --num-workers 2 --job-name worker --task 1 --remotes 1' Enter
tmux send-keys -t a3c:tb 'tensorboard --logdir /tmp/neonrace --port 12345' Enter
tmux send-keys -t a3c:htop htop Enter

Use `tmux attach -t a3c` to watch process output
Use `tmux kill-session -t a3c` to kill the job
Point your browser to http://localhost:12345 to see Tensorboard
(universe-starter-agent) Adams-MacBook-Pro-4:universe-starter-agent adamnoack$ 
(universe-starter-agent) Adams-MacBook-Pro-4:universe-starter-agent adamnoack$ open vnc://localhost:5901
(universe-starter-agent) Adams-MacBook-Pro-4:universe-starter-agent adamnoack$ open vnc://localhost:5900
dtcarls commented 6 years ago

Have you tried going to localhost:15900/viewer/?password=openai in your browser?

MrDadaGuy commented 6 years ago

I have this same issue, and following @dtcarls comment, gave me a screen which just shows

Disconnect timeout  

Otherwise it's clearly still running but I just can't connect to the VNC to see. I'm on Ubuntu 16.04 -- and I will say that some of the flash games do pop the VNC window as expected, but Pong isn't doing so.

Thanks,

Update: It was working on a different port: http://localhost:15901/viewer/?password=openai