Closed vics-kwon closed 6 years ago
In addition, Could you explain this command? this command also make error.
$ pip install -e "retro-contest/support[docker]"
retro-contest/support[docker] should either be a path to a local project or a VCS url beginning with svn+, git+, hg+, or bzr+
Thus, I installed retro-contest using below command
$ pip install -e "retro-contest/support"
Is it okay?
yeah, that's probably because you didn't drag in the docker
dependency (which is what the [docker]
does, or is supposed to do). Try pip install docker
and then run the command again.
If you're on Windows you'll need to update to latest git, btw.
So COOOOL~!!! All the command works well after installing docker with pip.
$ pip install docker
Thanks a lot.
ps. I'm on Mac and already have Docker for Mac.
@endrift I am having a similar problem
I am going into the docker image bash by using :
docker run -it remote-env
after tagging your image.
I then install docker on that image as mentioned above but when I try and run retro-contest run --agent $DOCKER_REGISTRY/simple-agent:v1 --results-dir results --no-nv --use-host-data
it gives me the error:
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
and it points directly at the adapters.py file in the python 3.5 files.
Could you please explain to me what's going on here? Is it because I am trying to run docker inside a docker image?
Can you give the full backtrace?
I am getting this exact same error, here is the backtrace for mine.
Traceback (most recent call last):
File "/root/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/root/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/root/venv/lib/python3.5/site-packages/docker/transport/unixconn.py", line 46, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/venv/lib/python3.5/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/root/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/root/venv/lib/python3.5/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/root/venv/lib/python3.5/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/root/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/root/venv/lib/python3.5/site-packages/urllib3/connectionpool.py", line 357, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.5/http/client.py", line 1106, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
self.endheaders(body)
File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
self._send_output(message_body)
File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
self.send(msg)
File "/usr/lib/python3.5/http/client.py", line 877, in send
self.connect()
File "/root/venv/lib/python3.5/site-packages/docker/transport/unixconn.py", line 46, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/venv/bin/retro-contest", line 9, in <module>
load_entry_point('retro-contest-support==0.1.0', 'console_scripts', 'retro-contest')()
File "/root/venv/lib/python3.5/site-packages/retro_contest/__main__.py", line 25, in main
args.func(args)
File "/root/venv/lib/python3.5/site-packages/retro_contest/docker.py", line 184, in run_args
results = run(args.game, args.state, args.entry, **kwargs)
File "/root/venv/lib/python3.5/site-packages/retro_contest/docker.py", line 68, in run
bridge = client.volumes.create('compo-tmp-vol-%s' % rand, driver='local', driver_opts={'type': 'tmpfs', 'device': 'tmpfs'})
File "/root/venv/lib/python3.5/site-packages/docker/models/volumes.py", line 57, in create
obj = self.client.api.create_volume(name, **kwargs)
File "/root/venv/lib/python3.5/site-packages/docker/api/volume.py", line 89, in create_volume
return self._result(self._post_json(url, data=data), True)
File "/root/venv/lib/python3.5/site-packages/docker/api/client.py", line 253, in _post_json
return self._post(url, data=json.dumps(data2), **kwargs)
File "/root/venv/lib/python3.5/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/root/venv/lib/python3.5/site-packages/docker/api/client.py", line 190, in _post
return self.post(url, **self._set_request_timeout(kwargs))
File "/root/venv/lib/python3.5/site-packages/requests/sessions.py", line 555, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/root/venv/lib/python3.5/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/root/venv/lib/python3.5/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/root/venv/lib/python3.5/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
@endrift, @walkeri showed exactly what I would've sent. Thanks again
Nevermind @endrift @walkeri, we were trying to run the file in the docker container, basically trying to run docker in docker. To fix this I just ran
cd retro-contest ./setup/setup.sh
Then it was installed locally and it outputs correctly to the csv files in the results directory.
but follow up question, is there a way to render this environment as it tests so that we can watch video of the agent running or do we have to use the "to video file".py? ( don't remember the exact file name right now)
Asked in Discord and the answer is no ^^^ for anyone that looks at this
In "Details", the way to run local evaluation is explained.
but, this command is not working. error message is..
I'm not sure whether 'retro-contest' is well installed or not.
ps. retro pkg installed in my notebook