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
231 stars 40 forks source link

Unable to find image 'starcraft:game' locally #26

Closed haopan27 closed 6 years ago

haopan27 commented 6 years ago

expected behaviour

Launch headful play of krasi0 and CherryPi on default map.

actual behaviour

errormsg1

steps to reproduce

In PowerShell, run $ scbw.play --bots "krasi0" "CherryPi" --show_all

Please run the command issued with --log_level=DEBUG parameter and log:

scbw.play --bots krasi0 CherryPi --headless --log_level=DEBUG

DEBUG checking bot in C:\Users\fractal\AppData\Roaming/scbw/bots/krasi0 DEBUG found bot in C:\Users\fractal\AppData\Roaming/scbw/bots/krasi0 DEBUG checking bot in C:\Users\fractal\AppData\Roaming/scbw/bots/CherryPi DEBUG found bot in C:\Users\fractal\AppData\Roaming/scbw/bots/CherryPi DEBUG ['docker', 'run', '-d', '--rm', '--privileged', '--name', 'GAME_2E5950A0_0_krasi0', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/logs:/app/logs:rw', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/bots:/app/bots:ro', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/maps:/app/sc/maps:rw', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/bwapi-data/BWTA:/app/sc/bwapi-data/BWTA:rw', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/bwapi-data/BWTA2:/app/sc/bwapi-data/BWTA2:rw', '--net', 'sc_net', '--volume', '//c/Users/fractal/AppData/Roaming/scbw/bots/krasi0/write/GAME_2E5950A0_0:/app/sc/bwapi-data/write:rw', '-e', 'PLAYER_NAME=krasi0', '-e', 'PLAYER_RACE=T', '-e', 'NTH_PLAYER=0', '-e', 'NUM_PLAYERS=2', '-e', 'GAME_NAME=GAME_2E5950A0', '-e', 'MAP_NAME=/app/sc/maps/sscai/(2)Benzene.scx', '-e', 'GAME_TYPE=FREE_FOR_ALL', '-e', 'SPEED_OVERRIDE=0', '-e', 'BOT_NAME=krasi0', '-e', 'BOT_FILE=krasi0AIClient.exe', 'starcraft:game', '/app/play_bot.sh', '--game', 'GAME_2E5950A0', '--name', 'krasi0', '--race', 'T', '--lan', '--host', '--map', '/app/sc/maps/sscai/(2)Benzene.scx'] Unable to find image 'starcraft:game' locally docker: Error response from daemon: pull access denied for starcraft, repository does not exist or may require 'docker login'. See 'docker run --help'. ERROR could not launch BotPlayer:krasi0:T in container GAME_2E5950A0_0_krasi0 Traceback (most recent call last): File "c:\users\fractal\appdata\local\programs\python\python36\lib\site-packages\scbw\cli.py", line 178, in main game_result = run_game(args) File "c:\users\fractal\appdata\local\programs\python\python36\lib\site-packages\scbw\game.py", line 107, in run_game wait_callback) File "c:\users\fractal\appdata\local\programs\python\python36\lib\site-packages\scbw\docker.py", line 296, in launch_game player, nth_player=i, num_players=len(players), **launch_params) File "c:\users\fractal\appdata\local\programs\python\python36\lib\site-packages\scbw\docker.py", line 267, in launch_image (player, game_name, nth_player, player.name))) scbw.error.DockerException: could not launch BotPlayer:krasi0:T in container GAME_2E5950A0_0_krasi0

operating system

win (Windows 10 Pro)

docker version

output of command docker version:

Client:

Version: 17.09.0-ce API version: 1.32 Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:40:09 2017 OS/Arch: windows/amd64

Server: Version: 17.09.0-ce API version: 1.32 (minimum version 1.12) Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:45:38 2017 OS/Arch: linux/amd64 Experimental: true

scbw version

output of command scbw.play -v

0.2b2
michalsustr commented 6 years ago

Did you run scbw.play --install ?

There has been some changes recently to how the package is installed.

haopan27 commented 6 years ago

Yes, I did. I just ran scbw.play --install again, the installation was successful:

install

The installation changed things. Now I have another error message after running scbw.play --bots krasi0 CherryPi --headless --log_level=DEBUG:

debug

What should I check/do next?

michalsustr commented 6 years ago

Please try with the latest version, eg $ pip install scbw==0.2b3 $ scbw.play --install

If the error persists, try to post contents of the latest logs from C:\Users\fractal\AppData\Roaming\scbw\logs

haopan27 commented 6 years ago

The games can be run successfully now. I think this issue #26 can be closed. The logs are shown below in case anyone is interested to see them.

pip install scbw==0.2b3 Installing collected packages: scbw Found existing installation: scbw 0.2b2 Uninstalling scbw-0.2b2: Successfully uninstalled scbw-0.2b2 Successfully installed scbw-0.2b3

scbw.play --install SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories. INFO successfully built image starcraft:game INFO downloading maps from SSCAI 2.00MB [00:00, 2.26MB/s] INFO downloading BWTA caches 5.00MB [00:01, 3.83MB/s] INFO Install finished. Data files are located in INFO C:\Users\fractal\AppData\Roaming/scbw

scbw.play --bots krasi0 CherryPi --headless --log_level=DEBUG Game GAME_30AB23B8 finished in 187.86293172836304 seconds. INFO Logs are saved here: INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_0_krasi0_bot.log INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_0_krasi0_game.log INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_1_CherryPi_bot.log INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_1_CherryPi_game.log INFO --- INFO Replays are saved here: INFO C:\Users\fractal\AppData\Roaming/scbw/maps/replays\GAME_30AB23B8_0.rep INFO C:\Users\fractal\AppData\Roaming/scbw/maps/replays\GAME_30AB23B8_0.rep INFO C:\Users\fractal\AppData\Roaming/scbw/maps/replays\GAME_30AB23B8_1.rep INFO C:\Users\fractal\AppData\Roaming/scbw/maps/replays\GAME_30AB23B8_1.rep INFO --- INFO Frame information is saved here: INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_0_frames.csv INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_1_frames.csv INFO --- INFO Game results are saved here: INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_0_results.json INFO C:\Users\fractal\AppData\Roaming/scbw/logs\GAME_30AB23B8_1_results.json INFO --- INFO Winner is BotPlayer:CherryPi:Z (player 1)