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

Minor changes to make it easier to develop/debug #1

Closed ebetica closed 6 years ago

ebetica commented 6 years ago

I made a few changes here:

  1. Add a chmod 777 bots logs to the README, which was necesssary to get it running for me.
  2. Set all the scripts to +x. You guys might not want that, but it's was really annoying to debug why it wasn't working without this change. Perhaps a -debug to turn this on might be useful.
  3. Change all the scripts to be outside of the container, by mounting scripts/. This way, you can make edits to the scripts without touching the container itself.
ebetica commented 6 years ago

Oops, I just realized you guys had a ton of changes in dev/ :D I would still suggest doing all three of these, simply because then the docker image wouldn't need to change very often. Perhaps the implementation is a bit different.

michalsustr commented 6 years ago

Omg, I didn't notice that there are PRs :) I will look into it on Monday. Thanks!

michalsustr commented 6 years ago

1) Permissions - it's on TODO to make permissions properly, so that the bot user cannot access other files than bwapi-data/{read, write}. This is however a bit complicated due to how docker handles this (host vs container UIDs/GIDs), it might need gosu or something like that and I need to study more deeply how this is properly done. 2) I've set some additional +x :) 3) I think scripts are fine, they don't change much. I was thinking about putting hook_* outside, but I'm not sure if there is some usecase that needs that (you can extend docker image rather than mount dirs).

I tried to move most of the shell scripts into python, because it's bash is a mess when it's more than 10 lines :)

michalsustr commented 6 years ago

So closing for now, as the changes don't apply :/