File tree Expand file tree Collapse file tree 9 files changed +117
-0
lines changed Expand file tree Collapse file tree 9 files changed +117
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .swp
2
+ * .swo
3
+ * .pyc
4
+ downloads
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:16.04
2
+
3
+
4
+ # Update the image with required build packages
5
+ RUN \
6
+ sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
7
+ apt-get update && \
8
+ apt-get -y upgrade && \
9
+ apt-get install -y \
10
+ net-tools \
11
+ build-essential \
12
+ clang \
13
+ cmake \
14
+ curl \
15
+ git \
16
+ htop \
17
+ libidn11 \
18
+ libz-dev \
19
+ libssl-dev \
20
+ make \
21
+ python-minimal \
22
+ software-properties-common \
23
+ unzip \
24
+ vim \
25
+ wget
26
+
27
+ # Add the code
28
+ WORKDIR /s2client-api
29
+ ADD downloads/s2client-api .
30
+ ADD api-*.sh .
31
+
32
+ ENTRYPOINT [ "/bin/bash" ]
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:16.04
2
+
3
+
4
+ # Update the image with required build packages
5
+ RUN \
6
+ sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list && \
7
+ apt-get update && \
8
+ apt-get -y upgrade && \
9
+ apt-get install -y \
10
+ net-tools \
11
+ htop \
12
+ python-minimal \
13
+ software-properties-common
14
+
15
+ # Please run ./download.sh && ./unpack.sh before running this Dockerfile
16
+ # Add the 3.16.1
17
+ WORKDIR /SC2/3.16.1
18
+ ADD downloads/3.16.1 .
19
+
20
+ # Expose the API listen port
21
+ EXPOSE 12000
22
+
23
+ # Start SC2 with API listen port
24
+ ENTRYPOINT [ "/SC2/3.16.1/StarCraftII/Versions/Base55958/SC2_x64", \
25
+ "-listen", \
26
+ "127.0.0.1", \
27
+ "-port", \
28
+ "12000" ]
Original file line number Diff line number Diff line change
1
+ # s2client-docker
2
+
3
+ A docker image for building and running the StarCraft II API on Linux
4
+
5
+ # Summary
6
+
7
+ By downloading and running this you are agreeing to the [ StarCraft II AI and Machine Learning License] ( https://github.com/Blizzard/s2client-proto/blob/dca8b6831a84747c2cd6e0c33d6416e14838d886/DATA_LICENSE )
8
+
9
+ There are three main components to getting docker image of StarCraft II running
10
+
11
+ 1 . Downloading the Linux build and base maps
12
+ 2 . Installing replay packs and the Battle.net cache to run hem
13
+ 3 . Building and running the API interface for running tests
14
+
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ mkdir -p build
3
+ pushd build
4
+ cmake -G " Unix Makefiles" ..
5
+ make -j8 all
6
+ popd
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ docker build . -f Dockerfile.build -t s2client-api
4
+ docker build . -f Dockerfile.game -t s2client-game
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ mkdir -p downloads
3
+ pushd downloads
4
+ rm -rf s2client-api
5
+ git clone --recursive https://github.com/Blizzard/s2client-api
6
+ popd
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ mkdir -p downloads/
3
+ pushd downloads
4
+ wget http://blzdistsc2-a.akamaihd.net/Linux/SC2.3.16.1.zip
5
+ wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season1.zip
6
+ wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season2.zip
7
+ wget http://blzdistsc2-a.akamaihd.net/MapPacks/Ladder2017Season3.zip
8
+ wget http://blzdistsc2-a.akamaihd.net/MapPacks/Melee.zip
9
+ popd
Original file line number Diff line number Diff line change
1
+ VERSION=3.16.1
2
+ UNZIP_CMD=" unzip -Piagreetotheeula"
3
+
4
+ pushd downloads
5
+
6
+ if [ ! -d ${VERSION} /StarCraftII ]; then
7
+ $UNZIP_CMD SC2.${VERSION} .zip -d ${VERSION}
8
+ fi
9
+
10
+ for i in ` ls -1 {Ladder,Melee}* .zip` ; do
11
+ $UNZIP_CMD $i -d ${VERSION} /StarCraftII/Maps
12
+ done
13
+
14
+ popd
You can’t perform that action at this time.
0 commit comments