-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- cleaned up Docker files
- Loading branch information
Showing
14 changed files
with
185 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# this is a container for running pycharm apps against tensorforce from | ||
FROM ubuntu:xenial | ||
RUN apt-get update -y | ||
RUN apt-get install -y --no-install-recommends tzdata python3 python3-dev python3-pip python3-setuptools git dos2unix net-tools iproute2 iputils-ping telnet | ||
RUN apt-get install -y python3-setuptools --upgrade | ||
RUN apt-get install -y build-essential | ||
RUN pip3 install wheel numpy msgpack msgpack-numpy pydevd tensorflow tensorforce dm-sonnet jupyter notebook cached_property scipy cython matplotlib pygame msgpack-python pillow virtualenv virtualenvwrapper python-dateutil gym gym[atari] | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# to build the initial UE4 Engine without any game | ||
# available on docker hub as ducandu/ue4 | ||
|
||
FROM ubuntu:xenial | ||
RUN apt-get update -y && apt-get install -y --no-install-recommends tzdata shared-mime-info libnss3 libxss1 libasound2 python3 python3-dev python3-pip sudo vim git mono-reference-assemblies-4.0 mono-devel mono-xbuild mono-mcs mono-dmcs libmono-system-data-datasetextensions4.0-cil libmono-system-web-extensions4.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil libmono-microsoft-build-tasks-v4.0-4.0-cil cmake dos2unix clang-5.0 clang-3.8 libqt4-dev git build-essential ca-certificates pkg-config bash-completion | ||
RUN apt-get install -y python3-setuptools --upgrade | ||
RUN pip3 install numpy msgpack msgpack-numpy pydevd | ||
# add some ue4 user (UE4 does not allow building with root) | ||
RUN adduser --disabled-password --home /home/ue4 --shell /bin/bash ue4 && usermod -a -G sudo ue4 | ||
|
||
# change to new user | ||
USER ue4 | ||
WORKDIR /home/ue4 | ||
|
||
# git all needed repos | ||
RUN git clone https://18920f59b27e7c4b79fbef856af2152612e1f471@github.com/EpicGames/UnrealEngine.git | ||
WORKDIR UnrealEngine | ||
RUN ./Setup.sh | ||
RUN ./GenerateProjectFiles.sh -engine | ||
|
||
RUN make | ||
|
||
CMD ["bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
ARG base_container=base_container | ||
FROM ducandu/ue4_game AS game | ||
RUN echo " " | ||
|
||
|
||
# new container based on Ubuntu | ||
FROM ubuntu:xenial | ||
|
||
# install minimal python tools to be able to run plugin UnrealEnginePython | ||
RUN apt-get update -y && apt-get install -y --no-install-recommends python3 python3-dev python3-pip python3-setuptools | ||
RUN pip3 install numpy msgpack msgpack-numpy pydevd | ||
|
||
# add the game user | ||
RUN adduser --disabled-password --home /home/ue4 --shell /bin/bash ue4 && usermod -a -G sudo ue4 | ||
# change to new user | ||
USER ue4 | ||
WORKDIR /home/ue4 | ||
RUN mkdir -p Games/AlienInvaders | ||
WORKDIR Games/AlienInvaders | ||
|
||
# just copy the cooked game | ||
COPY --from=game --chown=ue4:ue4 /home/ue4/UnrealEngine/AlienInvaders/Build/LinuxNoEditor ./ | ||
# and the python scripts | ||
RUN mkdir -p AlienInvaders/Content/Scripts | ||
COPY --from=game --chown=ue4:ue4 /home/ue4/UnrealEngine/AlienInvaders/Content/Scripts AlienInvaders/Content/Scripts/ | ||
|
||
#USER root | ||
#RUN chmod -R 0777 /home/ue4/Games/AlienInvaders | ||
#USER ue4 | ||
|
||
# TODO: add PYTHONPATH pointing to Games/.../Content/Scripts to env | ||
|
||
# start the game automatically when running this container | ||
# CMD ["/home/ue4/Games/AlienInvaders/AlienInvaders.sh -NullRHI -nosound"] | ||
CMD ["bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# to update and incrementally build/cook a game | ||
# creates a new image based on the game's init image to allow for a fast incremental build/cook | ||
ARG base_container=ue4_alieninvaders | ||
|
||
FROM ducandu/$base_container | ||
|
||
USER ue4 | ||
WORKDIR /home/ue4 | ||
|
||
# update our repos | ||
WORKDIR marlene | ||
RUN git pull | ||
WORKDIR UnrealEnginePython | ||
RUN git pull | ||
|
||
# copy (update; only newer files) the example game and the two plugins into UnrealEngine | ||
WORKDIR /home/ue4 | ||
RUN cp -r -u marlene/examples/UE4Games/${GAME} UnrealEngine/. | ||
RUN cp -r -u marlene/Plugins/MaRLEnE UnrealEngine/${GAME}/Plugins/. | ||
RUN cp -r -u UnrealEnginePython UnrealEngine/${GAME}/Plugins/. | ||
|
||
WORKDIR UnrealEngine | ||
|
||
# update necessary scripts from the plugin to the game's content folder | ||
RUN cp -u ${GAME}/Plugins/MaRLEnE/Scripts/* ${GAME}/Content/Scripts/. | ||
|
||
# incrementally build and cook the game | ||
RUN Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project=${GAME}/${GAME}.uproject -nop4 -build -cook -compressed -stage -platform=Linux -clientconfig=Development -pak -archive -archivedirectory="${GAME}/Build" -utf8output | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# to build a initial game on top of the basic (engine) ducandu/ue4 container | ||
|
||
# - use docker build --build-arg game=AlienInvaders to build this image | ||
# `docker build --build-arg game=AlienInvaders -l ducandu/ue4_[some_game_name] .` | ||
|
||
FROM ducandu/ue4 | ||
|
||
USER ue4 | ||
WORKDIR /home/ue4 | ||
|
||
# default game; override this via `--build-arg game=` on `docker build` command line | ||
ARG game=AlienInvaders | ||
ENV GAME=$game | ||
|
||
# git all needed repos | ||
RUN git clone https://github.com/ducandu/marlene.git | ||
RUN git clone https://github.com/20tab/UnrealEnginePython.git | ||
RUN mkdir -p UnrealEngine/${GAME}/Plugins | ||
# copy the example game and the two plugins into UnrealEngine | ||
RUN cp -r marlene/examples/UE4Games/${GAME} UnrealEngine/. | ||
RUN cp -r marlene/Plugins/MaRLEnE UnrealEngine/${GAME}/Plugins/. | ||
RUN cp -r UnrealEnginePython UnrealEngine/${GAME}/Plugins/. | ||
|
||
WORKDIR UnrealEngine | ||
|
||
## Modify the UnrealEnginePython build cs file to add the python lib and include paths | ||
# not necessary as ubuntu is covered by the default values in UEPython build cs | ||
#RUN sed -i 's/\/usr\/local\/include\/python3.6//' AlienInvaders/Plugins/UnrealEnginePython/Source/UnrealEnginePython/UnrealEnginePython.Build.cs | ||
|
||
# - copy necessary scripts from the plugin to the game's content folder | ||
RUN mkdir -p ${GAME}/Content/Scripts/ && cp ${GAME}/Plugins/MaRLEnE/Scripts/* ${GAME}/Content/Scripts/. | ||
|
||
# initial build and cook of the game | ||
RUN Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project=${GAME}/${GAME}.uproject -nop4 -build -cook -compressed -stage -platform=Linux -clientconfig=Development -pak -archive -archivedirectory="${GAME}/Build" -utf8output | ||
|
||
CMD ["bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -150,6 +150,6 @@ | |
} | ||
], | ||
"TargetPlatforms": [ | ||
"Android" | ||
"LinuxNoEditor" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-31.5 KB
(93%)
examples/UE4Games/AlienInvaders/Content/Blueprints/BP_GameMode.uasset
Binary file not shown.
Binary file modified
BIN
-3.13 KB
(97%)
examples/UE4Games/AlienInvaders/Content/Maps/Map_MainGame.umap
Binary file not shown.
Binary file modified
BIN
-209 Bytes
(99%)
examples/UE4Games/AlienInvaders/Content/Maps/Map_MainGame_BuiltData.uasset
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters