Games-and-Simulations / sc-docker

Multi-platform Version of StarCraft: Brood War in a Docker Container, ready to use for bot play simulations.
MIT License
230 stars 41 forks source link

Code 9 on scbw.play --install #79

Closed RothNath closed 6 years ago

RothNath commented 6 years ago

expected behaviour

Successful installation

actual behaviour

scbw.play --install WARNING Path C:\Users\557\AppData\Roaming/scbw found, re-installing scbw package. WARNING Re-creating the base game image... INFO checking docker can run INFO checking whether docker has network sc_net INFO docker image starcraft:game-1.0.3 removed. INFO checking if there is local image starcraft:game-1.0.3 INFO image not found locally, creating... INFO copying files from c:\python364\lib\site-packages\scbw\local_docker to C:\Users\557\AppData\Roaming/scbw\docker. INFO pulling image ggaic/starcraft:java-1.0.3, this may take a while... INFO building local image starcraft:game-1.0.3, this may take a while... Traceback (most recent call last): File "c:\python364\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\python364\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python364\Scripts\scbw.play.exe__main__.py", line 9, in File "c:\python364\lib\site-packages\scbw\cli.py", line 209, in main install() File "c:\python364\lib\site-packages\scbw\install.py", line 19, in install ensure_local_image(SC_IMAGE) File "c:\python364\lib\site-packages\scbw\docker_utils.py", line 119, in ensure_local_image path=base_dir, dockerfile='game.dockerfile', tag=local_image) File "c:\python364\lib\site-packages\docker\models\images.py", line 266, in build raise BuildError(chunk['error'], result_stream) docker.errors.BuildError: The command '/bin/sh -c unzip -q /tmp/starcraft.zip -d /tmp/starcraft && rm -rf /tmp/starcraft/characters/ /tmp/starcraft/maps/ && chown starcraft:users -R /tmp/starcraft && cp /tmp/player* /tmp/starcraft/characters && chown starcraft:users -R /tmp/starcraft/characters' returned a non-zero code: 9

steps to reproduce

Install scbw in docker - 1.03 update directly. I can install 1.0.1 and upgrade to 1.0.3, but not go to 1.0.3 directly. At least in this current release of docker.

operating system

win 10 64 bit

docker version Client: Version: 18.03.1-ce API version: 1.37 Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:12:48 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.03.1-ce API version: 1.37 (minimum version 1.12) Go version: go1.9.5 Git commit: 9ee9f40 Built: Thu Apr 26 07:22:38 2018 OS/Arch: linux/amd64 Experimental: true

RothNath commented 6 years ago

Tried going back to docker version Version 17.09.0-ce-win33 (13620), with the same result.

kant2002 commented 6 years ago

Do you use Docker for Windows or Docker Toolbox?

On Sat, Jun 2, 2018 at 23:21 RothNath notifications@github.com wrote:

Tried going back to docker version Version 17.09.0-ce-win33 (13620), with the same result.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Games-and-Simulations/sc-docker/issues/79#issuecomment-394103030, or mute the thread https://github.com/notifications/unsubscribe-auth/AED1N4ZXkGYghtvQqoRTA-fHez-KHcPbks5t4smCgaJpZM4UVmI7 .

RothNath commented 6 years ago

Docker for windows. Version 17.09.0-ce-win33 (13620) is the version directly from the install directions. Thanks again for the help!

kant2002 commented 6 years ago

I not sure that this is applicable to your case,

RothNath commented 6 years ago

I think we are onto something here. I can't extract the archive. Bad DL? What size is starcraft.zip supposed to be?

kant2002 commented 6 years ago

@RothNath I have starcarft.zip with size 105_659_792 bytes. I recommend you just remove it and re-run scbw.play --install again. Most likely you have internet hiccup during the first run, so downloading process was terminated.

@michalsustr it is probably indication that verification of downloading starcraft.zip file should be added to the source code. That allow us to spot such issues before creation of local docker container. That way error could be recovered.

RothNath commented 6 years ago

I don't have the best connection in the world, but it seems that the DL is extra touchy as far as connection quality. Here's what 3 install / DL attempts look like. It way be worth having it DL in a bit more robust way.

scbw.play --install WARNING Path C:\Users\557\AppData\Roaming/scbw found, re-installing scbw package. WARNING Re-creating the base game image... INFO checking docker can run INFO checking whether docker has network sc_net INFO docker image starcraft:game-1.0.3 removed. INFO checking if there is local image starcraft:game-1.0.3 INFO image not found locally, creating... INFO copying files from c:\python364\lib\site-packages\scbw\local_docker to C:\Users\557\AppData\Roaming/scbw\docker. INFO downloading starcraft.zip to C:\Users\557\AppData\Roaming/scbw\docker/starcraft.zip 12%|██████████▏ | 12.0/101 [08:22<1:01:54, 41.9s/MB] C:\Users\557>scbw.play --install WARNING Path C:\Users\557\AppData\Roaming/scbw found, re-installing scbw package. WARNING Re-creating the base game image... INFO checking docker can run INFO checking whether docker has network sc_net INFO docker image starcraft:game-1.0.3 removed. INFO checking if there is local image starcraft:game-1.0.3 INFO image not found locally, creating... INFO copying files from c:\python364\lib\site-packages\scbw\local_docker to C:\Users\557\AppData\Roaming/scbw\docker. INFO downloading starcraft.zip to C:\Users\557\AppData\Roaming/scbw\docker/starcraft.zip 51%|████████████████████████████████████████████▌ | 51.0/101 [05:13<05:06, 6.16s/MB] INFO pulling image ggaic/starcraft:java-1.0.3, this may take a while... INFO building local image starcraft:game-1.0.3, this may take a while... Traceback (most recent call last): File "c:\python364\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\python364\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python364\Scripts\scbw.play.exe__main__.py", line 9, in File "c:\python364\lib\site-packages\scbw\cli.py", line 209, in main install() File "c:\python364\lib\site-packages\scbw\install.py", line 19, in install ensure_local_image(SC_IMAGE) File "c:\python364\lib\site-packages\scbw\docker_utils.py", line 119, in ensure_local_image path=base_dir, dockerfile='game.dockerfile', tag=local_image) File "c:\python364\lib\site-packages\docker\models\images.py", line 266, in build raise BuildError(chunk['error'], result_stream) docker.errors.BuildError: The command '/bin/sh -c unzip -q /tmp/starcraft.zip -d /tmp/starcraft && rm -rf /tmp/starcraft/characters/ /tmp/starcraft/maps/ && chown starcraft:users -R /tmp/starcraft && cp /tmp/player* /tmp/starcraft/characters && chown starcraft:users -R /tmp/starcraft/characters' returned a non-zero code: 9

scbw.play --install WARNING Path C:\Users\557\AppData\Roaming/scbw found, re-installing scbw package. WARNING Re-creating the base game image... INFO checking docker can run INFO checking whether docker has network sc_net INFO docker image starcraft:game-1.0.3 removed. INFO checking if there is local image starcraft:game-1.0.3 INFO image not found locally, creating... INFO copying files from c:\python364\lib\site-packages\scbw\local_docker to C:\Users\557\AppData\Roaming/scbw\docker. INFO downloading starcraft.zip to C:\Users\557\AppData\Roaming/scbw\docker/starcraft.zip 71%|██████████████████████████████████████████████████████████████▉ | 72.0/101 [06:19<02:31, 5.27s/MB] INFO pulling image ggaic/starcraft:java-1.0.3, this may take a while... INFO building local image starcraft:game-1.0.3, this may take a while... Traceback (most recent call last): File "c:\python364\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\python364\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Python364\Scripts\scbw.play.exe__main__.py", line 9, in File "c:\python364\lib\site-packages\scbw\cli.py", line 209, in main install() File "c:\python364\lib\site-packages\scbw\install.py", line 19, in install ensure_local_image(SC_IMAGE) File "c:\python364\lib\site-packages\scbw\docker_utils.py", line 119, in ensure_local_image path=base_dir, dockerfile='game.dockerfile', tag=local_image) File "c:\python364\lib\site-packages\docker\models\images.py", line 266, in build raise BuildError(chunk['error'], result_stream) docker.errors.BuildError: The command '/bin/sh -c unzip -q /tmp/starcraft.zip -d /tmp/starcraft && rm -rf /tmp/starcraft/characters/ /tmp/starcraft/maps/ && chown starcraft:users -R /tmp/starcraft && cp /tmp/player* /tmp/starcraft/characters && chown starcraft:users -R /tmp/starcraft/characters' returned a non-zero code: 9

RothNath commented 6 years ago

Re-downloading in the end resolved the issue. Many thanks!