Skip to content
Snippets Groups Projects
Commit 7a3d4891 authored by Daniel de Leng's avatar Daniel de Leng
Browse files

Integrate SC2 in Docker

parent 4ce41048
No related branches found
No related tags found
No related merge requests found
# FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu22.04 FROM nvidia/opengl:1.0-glvnd-runtime-ubuntu22.04
# RUN apt-get update && apt-get install -y x11-apps && rm -rf /var/lib/apt/lists/* # RUN apt-get update && apt-get install -y x11-apps && rm -rf /var/lib/apt/lists/*
RUN apt update && apt install vim wget unzip -y
COPY --from=continuumio/miniconda3:4.12.0 /opt/conda /opt/conda COPY --from=continuumio/miniconda3:4.12.0 /opt/conda /opt/conda
...@@ -14,3 +14,10 @@ RUN pip install pysc2==3.0.0 ...@@ -14,3 +14,10 @@ RUN pip install pysc2==3.0.0
# https://github.com/google-deepmind/pysc2/issues/308 # https://github.com/google-deepmind/pysc2/issues/308
RUN pip uninstall -y pygame RUN pip uninstall -y pygame
RUN pip install pygame==1.9.6 RUN pip install pygame==1.9.6
WORKDIR /root/
RUN wget -q http://blzdistsc2-a.akamaihd.net/Linux/SC2.4.9.3.zip && unzip -P iagreetotheeula SC2.4.9.3.zip && rm SC2.4.9.3.zip
RUN mv SC2.4.9.3/StarCraftII/ StarCraftII/
RUN rm -rf SC2.4.9.3/
RUN chmod +x StarCraftII/Versions/Base75025/SC2_x64
RUN ln -s /root/StarCraftII/Maps /root/StarCraftII/maps
...@@ -3,14 +3,13 @@ ...@@ -3,14 +3,13 @@
docker run \ docker run \
--volume=/tmp/.X11-unix:/tmp/.X11-unix \ --volume=/tmp/.X11-unix:/tmp/.X11-unix \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" \ --volume="$HOME/.Xauthority:/root/.Xauthority:rw" \
--volume=$(pwd)/SC2.4.9.3/StarCraftII/:/root/StarCraftII \
--volume=$(pwd)/replays:/root/StarCraftII/Replays \ --volume=$(pwd)/replays:/root/StarCraftII/Replays \
--volume=$(pwd)/maps/InterloperTest.SC2Map:/root/StarCraftII/Maps/InterloperTest.SC2Map \
--name pysc2 \ --name pysc2 \
-e DISPLAY=$DISPLAY \ -e DISPLAY=$DISPLAY \
-e PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \ -e PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python \
-e SC2PATH=/root/StarCraftII/ \ -e SC2PATH=/root/StarCraftII/ \
-it \ -it \
-w /ws \
--rm \ --rm \
--gpus all \ --gpus all \
pysc2 \ pysc2 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment