openai / universe

Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
https://universe.openai.com
MIT License
7.47k stars 959 forks source link

Always get timeout when pulling the quay.io/openai/universe.flashgames:0.20.28 image #178

Closed GoBigorGoHome closed 6 years ago

GoBigorGoHome commented 7 years ago

Expected behavior

to pull the quay.io/openai/universe.flashgames:0.20.28

Actual behavior

[2017-04-15 20:13:32,626] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.28. Run the same thing by hand as: docker run -p 5900:5900 -p 15900:15900 --ipc host --cap-add SYS_ADMIN --privileged quay.io/openai/universe.flashgames:0.20.28 [2017-04-15 20:13:32,637] Image quay.io/openai/universe.flashgames:0.20.28 not present locally; pulling 0.20.28: Pulling from openai/universe.flashgames aed15891ba52: Already exists 773ae8583d14: Already exists d1d48771f782: Already exists cd3d6cd6c0cf: Already exists 8ff6f8a9120c: Already exists dd8b54e91746: Already exists 2e5cb956f982: Already exists 0c93ba10c511: Already exists 39d8cf200333: Already exists 7f890b5c2ffb: Already exists 376798e834f8: Already exists e0bf4006396b: Already exists f7ab06525008: Already exists 3906ec9156e2: Already exists 9e15b01284c5: Already exists bd51ef3532c1: Already exists 35942670c413: Already exists 68f2958ec854: Already exists 16c5a38bc1e6: Already exists 72d0d0234a6f: Already exists 29ab8bfac8ec: Already exists 1ffcc9378fb7: Already exists 77841c2a13d8: Already exists 574cb7190254: Already exists 0500c490d3fc: Downloading [==========================================> ] 73.39 MB/86.34 MB 204a3ebf8394: Download complete 8539a95410fb: Download complete 09a7bfc2e974: Download complete eca301967f46: Download complete 76437fadd1e0: Download complete 6e9da982ddd3: Download complete 199cc962635e: Download complete 35da256c6da2: Download complete c95cc04a41af: Download complete 9ef3827e8abc: Downloading [> ] 503.4 kB/50.32 MB d09e875f3fbb: Downloading c07170a16af8: Waiting 2ddc2ee56600: Waiting e6f27c86280b: Waiting c275f5b5ffc5: Waiting 18e64f9f2055: Waiting 76241e684590: Waiting 6a72ff0486be: Waiting Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/docker/client.py", line 170, in _raise_for_status response.raise_for_status() File "/usr/lib/python3/dist-packages/requests/models.py", line 840, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http+docker://localunixsocket/v1.27/containers/create?name=universe-kstrJ3-0

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/pat/universe/universe/remotes/docker_remote.py", line 263, in _spawn container = self._spawn_container() File "/home/pat/universe/universe/remotes/docker_remote.py", line 313, in _spawn_container 'com.openai.automanaged': 'true', File "/usr/local/lib/python3.5/dist-packages/docker/api/container.py", line 135, in create_container return self.create_container_from_config(config, name) File "/usr/local/lib/python3.5/dist-packages/docker/api/container.py", line 146, in create_container_from_config return self._result(res, True) File "/usr/local/lib/python3.5/dist-packages/docker/client.py", line 178, in _result self._raise_for_status(response) File "/usr/local/lib/python3.5/dist-packages/docker/client.py", line 173, in _raise_for_status raise errors.NotFound(e, response, explanation=explanation) docker.errors.NotFound: 404 Client Error: Not Found ("b'{"message":"No such image: quay.io/openai/universe.flashgames:0.20.28"}'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "first-agent.py", line 5, in env.configure(remotes=1) # automatically creates a local docker container File "/home/pat/universe/universe/wrappers/timer.py", line 14, in configure self.env.configure(kwargs) File "/home/pat/universe/universe/wrappers/render.py", line 21, in configure self.env.configure(kwargs) File "/home/pat/universe/universe/wrappers/throttle.py", line 32, in configure self.env.configure(**kwargs) File "/home/pat/universe/universe/envs/vnc_env.py", line 199, in configure use_recorder_ports=record, File "/home/pat/universe/universe/remotes/build.py", line 19, in build n=n, File "/home/pat/universe/universe/remotes/docker_remote.py", line 55, in init self._start() File "/home/pat/universe/universe/remotes/docker_remote.py", line 82, in _start [instance.start() for instance in self.instances] File "/home/pat/universe/universe/remotes/docker_remote.py", line 82, in [instance.start() for instance in self.instances] File "/home/pat/universe/universe/remotes/docker_remote.py", line 235, in start self._spawn() File "/home/pat/universe/universe/remotes/docker_remote.py", line 269, in _spawn self._pull_image() File "/home/pat/universe/universe/remotes/docker_remote.py", line 289, in _pull_image progress_stream.stream_output(output, sys.stdout)) File "/home/pat/universe/universe/remotes/compose/progress_stream.py", line 23, in stream_output print_output_event(event, stream, is_terminal) File "/home/pat/universe/universe/remotes/compose/progress_stream.py", line 58, in print_output_event raise StreamOutputError(event['errorDetail']['message']) universe.remotes.compose.progress_stream.StreamOutputError: dial tcp 54.231.49.170:443: i/o timeout

Versions

Please include the result of running

$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow
Linux pat-ThinkPad-E455 4.8.0-46-generic #49~16.04.1-Ubuntu SMP Fri Mar 31 14:51:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.12
Name: universe
Version: 0.21.5
Summary: Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
Home-page: https://github.com/openai/universe
Author: OpenAI
Author-email: universe@openai.com
License: UNKNOWN
Location: /home/pat/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
---
Name: gym
Version: 0.8.1
Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.
Home-page: https://github.com/openai/gym
Author: OpenAI
Author-email: gym@openai.com
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires: pyglet, numpy, requests, six
---
Name: numpy
Version: 1.11.0
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-discussion@scipy.org
License: BSD
Location: /usr/lib/python3/dist-packages
Requires: 
---
Name: go-vncdriver
Version: 0.4.19
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires: numpy
---
Name: Pillow
Version: 4.1.0
Summary: Python Imaging Library (Fork)
Home-page: https://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
License: Standard PIL License
Location: /usr/local/lib/python3.5/dist-packages
Requires: olefile
tlbtlbtlb commented 7 years ago

See https://github.com/openai/universe/wiki/Solutions-to-common-problems#docker-wont-pull-images, especially the "download the image manually" part.

tarvos21 commented 7 years ago

@GoBigorGoHome, I have encountered a similar problem with docker pull, it will not use any proxy normally, some special networking settings have to be done in order to make docker use your proxy, then the pulling process will go through much better. I have written a simple article for this (sorry, it's in Chinese): https://zhuanlan.zhihu.com/p/26033249

GoBigorGoHome commented 7 years ago

@tarvos21 I forgot to mention that I'm in China too, and I've come to think that the time-out error might have something to do with the GFW. As mentioned in your article, I've also tried with the DaoClound docker accelerator suggested in the Solutions-to-common-problems and the aliyun docker accelerator, but neither worked. I'll try your solution. Thanks for your help.

tarvos21 commented 7 years ago

@GoBigorGoHome, you're welcome, hope it's helpful. The accelerators and mirror services in China indeed are not very useful, especially for new docker Images.