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.45k stars 956 forks source link

"env.configure(remotes=1)" failed with error info "gzip: invalid checksum" #102

Closed sproblvem closed 7 years ago

sproblvem commented 7 years ago

Expected behavior

I followed the official tutorial try to run my first agent. It failed when I come to "env.configure(remotes=1)"

Actual behavior

Error info bellow:

[200220]yama@nuc:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)                                                                          
[GCC 5.4.0 20160609] on linux2                                                                                          
Type "help", "copyright", "credits" or "license" for more information.         
>>> import gym                                                                 
>>> import universe                                                            
>>> env = gym.make('flashgames.DuskDrive-v0')                                  
[2017-01-07 20:34:29,186] Making new env: flashgames.DuskDrive-v0              
>>> env.configure(remotes=1)                                                   
[2017-01-07 20:34:35,130] Writing logs to file: /tmp/universe-26960.log        
[2017-01-07 20:34:35,143] Ports used: []                                       
[2017-01-07 20:34:35,144] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.21. Run the same thing by hand as: docker run -p 5900:5900 -p 15900:15900 --cap-add SYS_ADMIN --ipc host --privileged quay.io/openai/universe.flashgames:0.20.21                                                            
[2017-01-07 20:34:35,146] Image quay.io/openai/universe.flashgames:0.20.21 not present locally; pulling                                                       
0.20.21: Pulling from openai/universe.flashgames
aed15891ba52: Pull complete
773ae8583d14: Pull complete
d1d48771f782: Pull complete
cd3d6cd6c0cf: Pull complete
8ff6f8a9120c: Pull complete
dd8b54e91746: Extracting [=================================================> ] 258.5 MB/259 MB MBload complete
0c93ba10c511: Download complete
39d8cf200333: Download complete
7f890b5c2ffb: Download complete
376798e834f8: Download complete
e0bf4006396b: Download complete
 3.463 MB/3.468 MBload complete
3906ec9156e2: Download complete
9e15b01284c5: Download complete
bd51ef3532c1: Download complete
35942670c413: Download complete
 607.8 kB/610.2 kBload complete
16c5a38bc1e6: Download complete
72d0d0234a6f: Download complete
29ab8bfac8ec: Download complete
1ffcc9378fb7: Download complete
77841c2a13d8: Download complete
574cb7190254: Download complete
c61e68f2ab86: Download complete
 23.39 MB/23.43 MBload complete
fadd9c2a63c2: Download complete
91cd5e7849f1: Download complete
f02e9ac920fe: Download complete
2719fb90fcdb: Download complete
dbec832b38e1: Download complete
5ecc5ae53d26: Download complete
c249c2a7a4b2: Download complete
1ab30bbb3da8: Download complete
3d23c52b2976: Download complete
  28.7 MB/28.91 MBload complete
2bd8938750bd: Download complete
a962cb7617f2: Download complete
e2e21507c443: Download complete
45551d17d541: Download complete
35c0c373fefc: Download complete
9b7f81b9b5fd: Download complete
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 225, in configure
    self._configure(*args, **kwargs)
  File "/home/yama/rl/universe/universe/vectorized/core.py", line 39, in _configure
    super(Wrapper, self)._configure(**kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 352, in _configure
    return self.env.configure(*args, **kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 225, in configure
    self._configure(*args, **kwargs)
  File "/home/yama/rl/universe/universe/wrappers/render.py", line 18, in _configure
    super(Render, self)._configure(**kwargs)
  File "/home/yama/rl/universe/universe/vectorized/core.py", line 39, in _configure
    super(Wrapper, self)._configure(**kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 352, in _configure
    return self.env.configure(*args, **kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 225, in configure
    self._configure(*args, **kwargs)
  File "/home/yama/rl/universe/universe/wrappers/throttle.py", line 27, in _configure
    super(Throttle, self)._configure(**kwargs)
  File "/home/yama/rl/universe/universe/vectorized/core.py", line 39, in _configure
    super(Wrapper, self)._configure(**kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 352, in _configure
    return self.env.configure(*args, **kwargs)
  File "/home/yama/.local/lib/python2.7/site-packages/gym/core.py", line 225, in configure
    self._configure(*args, **kwargs)
  File "/home/yama/rl/universe/universe/envs/vnc_env.py", line 193, in _configure
    use_recorder_ports=record,
  File "/home/yama/rl/universe/universe/remotes/build.py", line 19, in build
    n=n,
  File "/home/yama/rl/universe/universe/remotes/docker_remote.py", line 55, in __init__
    self._start()
  File "/home/yama/rl/universe/universe/remotes/docker_remote.py", line 82, in _start
    [instance.start() for instance in self.instances]
  File "/home/yama/rl/universe/universe/remotes/docker_remote.py", line 223, in start
    self._spawn()
  File "/home/yama/rl/universe/universe/remotes/docker_remote.py", line 257, in _spawn
    self._pull_image()
  File "/home/yama/rl/universe/universe/remotes/docker_remote.py", line 277, in _pull_image
    progress_stream.stream_output(output, sys.stdout))
  File "/home/yama/rl/universe/universe/remotes/compose/progress_stream.py", line 23, in stream_output
    print_output_event(event, stream, is_terminal)
  File "/home/yama/rl/universe/universe/remotes/compose/progress_stream.py", line 58, in print_output_event
    raise StreamOutputError(event['errorDetail']['message'])
universe.remotes.compose.progress_stream.StreamOutputError: failed to register layer: Error processing tar file(gzip: invalid checksum):

Versions

Please include the result of running

Linux nuc 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Python 2.7.12
---
Metadata-Version: 1.0
Name: universe
Version: 0.21.1
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/yama/rl/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
Classifiers:
---
Metadata-Version: 2.0
Name: gym
Version: 0.7.0
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
Installer: pip
License: UNKNOWN
Location: /home/yama/.local/lib/python2.7/site-packages
Requires: requests, six, numpy, pyglet
Classifiers:
---
Metadata-Version: 2.0
Name: tensorflow
Version: 0.9.0
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
Installer: pip
License: Apache 2.0
Location: /usr/local/lib/python2.7/dist-packages
Requires: numpy, six, protobuf, wheel
Classifiers:                                                                                                                                                                                       
  Development Status :: 4 - Beta                                                                                                                                                                   
  Intended Audience :: Developers                                                                                                                                                                  
  Intended Audience :: Education                                                                                                                                                                   
  Intended Audience :: Science/Research                                                                                                                                                            
  License :: OSI Approved :: Apache Software License                                                                                                                                               
  Programming Language :: Python :: 2.7                                                                                                                                                            
  Topic :: Scientific/Engineering :: Mathematics                                                                                                                                                   
  Topic :: Software Development :: Libraries :: Python Modules                                                                                                                                     
  Topic :: Software Development :: Libraries                                                                                                                                                       
Entry-points:                                                                                                                                                                                      
  [console_scripts]                                                                                                                                                                                
  tensorboard = tensorflow.tensorboard.tensorboard:main                                                                                                                                            
---                                                                                                                                                                                                
Metadata-Version: 1.1
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/python2.7/dist-packages
Requires: 
Classifiers:
  Development Status :: 5 - Production/Stable
  Intended Audience :: Science/Research
  Intended Audience :: Developers
  License :: OSI Approved
  Programming Language :: C
  Programming Language :: Python
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.6
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.2
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
  Programming Language :: Python :: 3.5
  Programming Language :: Python :: Implementation :: CPython
  Topic :: Software Development
  Topic :: Scientific/Engineering
  Operating System :: Microsoft :: Windows
  Operating System :: POSIX
  Operating System :: Unix
  Operating System :: MacOS
---
Metadata-Version: 2.0
Name: go-vncdriver
Version: 0.4.19
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
Installer: pip
License: UNKNOWN
Location: /home/yama/.local/lib/python2.7/site-packages
Requires: numpy
Classifiers:
---
Metadata-Version: 2.0
Name: Pillow
Version: 4.0.0
Summary: Python Imaging Library (Fork)
Home-page: http://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
Installer: pip
License: Standard PIL License
Location: /home/yama/.local/lib/python2.7/site-packages
Requires: olefile
Classifiers:
  Development Status :: 6 - Mature
  Topic :: Multimedia :: Graphics
  Topic :: Multimedia :: Graphics :: Capture :: Digital Camera
  Topic :: Multimedia :: Graphics :: Capture :: Screen Capture
  Topic :: Multimedia :: Graphics :: Graphics Conversion
  Topic :: Multimedia :: Graphics :: Viewers
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.3
  Programming Language :: Python :: 3.4
  Programming Language :: Python :: 3.5
  Programming Language :: Python :: 3.6
  Programming Language :: Python :: Implementation :: CPython
  Programming Language :: Python :: Implementation :: PyPy
tlbtlbtlb commented 7 years ago

This can happen if the network connection is interrupted in the middle of downloading the container.

Run

$ docker pull quay.io/openai/universe.flashgames:0.20.21

to download it manually, then try again.

sproblvem commented 7 years ago

thank you @tlbtlbtlb ! I tried your solution and got this

[093845]yama@nuc:~/rl/universe$ docker pull quay.io/openai/universe.flashgames:0.20.21
0.20.21: Pulling from openai/universe.flashgames

aed15891ba52: Downloading [=================================>                 ] 33.32 MB/50.07 MB
773ae8583d14: Download complete 
d1d48771f782: Download complete 
cd3d6cd6c0cf: Pull complete 
8ff6f8a9120c: Pull complete 
dd8b54e91746: Extracting [==================================================>]   259 MB/259 MB
2e5cb956f982: Download complete 
0c93ba10c511: Download complete 
39d8cf200333: Download complete 
7f890b5c2ffb: Download complete 
376798e834f8: Download complete 
e0bf4006396b: Download complete 
f7ab06525008: Download complete 
3906ec9156e2: Download complete 
9e15b01284c5: Download complete 
bd51ef3532c1: Download complete 
35942670c413: Download complete 
68f2958ec854: Download complete 
16c5a38bc1e6: Download complete 
72d0d0234a6f: Download complete 
29ab8bfac8ec: Download complete 
1ffcc9378fb7: Download complete 
77841c2a13d8: Download complete 
574cb7190254: Download complete 
c61e68f2ab86: Download complete 
be0b58b3d40f: Download complete 
fadd9c2a63c2: Download complete 
91cd5e7849f1: Download complete 
f02e9ac920fe: Download complete 
2719fb90fcdb: Download complete 
dbec832b38e1: Download complete 
5ecc5ae53d26: Download complete 
c249c2a7a4b2: Download complete 
1ab30bbb3da8: Download complete 
3d23c52b2976: Download complete 
d0db62cf8c25: Download complete 
2bd8938750bd: Download complete 
a962cb7617f2: Download complete 
e2e21507c443: Download complete 
45551d17d541: Download complete 
35c0c373fefc: Download complete 
9b7f81b9b5fd: Download complete 
failed to register layer: Error processing tar file(exit status 1): archive/tar: invalid tar header
tlbtlbtlb commented 7 years ago

It may be issue with Docker: https://github.com/docker/docker/issues/2461 What docker are you using? Is it up to date?

sproblvem commented 7 years ago

Today the file system of my computer crashed badly, which makes me to run the memory test. Then I found that one of my memory sticks was broken. The problem gone after I remove the broken one.....

@tlbtlbtlb I am sorry for the disturbance of this issue, and thank you very much for your kind reply!

And an additional advice, I think the installation guidence should include a step for installing go-vncdriver. I realized that I need to installe go-vncdriver, after I got the error message "go_vncdriver was installed without OpenGL support"