-
Unreal Engine 사용가능한 Docker 생성 파일언어정리 2019. 2. 20. 08:37
Dockerfile
----------------------------------------
## Author: Lee Jang-Won
FROM nvidia/opengl:1.0-glvnd-devel-ubuntu16.04
MAINTAINER Angler <jjangwani@nate.com>
# modify default repositories
ENV DEBIAN_FRONTEND noninteractive
RUN sed -i "s/kr.archive.ubuntu.com/ftp.daumkakao.com/g" /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
ca-certificates lsb-release vim module-init-tools build-essential openssh-server tzdata apt-utils software-properties-common sudo
RUN echo 'root:root' | chpasswd
RUN ln -fs /usr/share/zoneinfo/Asia/Seoul /etc/localtime && dpkg-reconfigure -f noninteractive tzdata
COPY ./Data/keyboard /etc/default/keyboard
# Unreal Engine dependencies
RUN apt-get install -y --no-install-recommends \
mono-xbuild \
mono-dmcs \
libmono-microsoft-build-tasks-v4.0-4.0-cil \
libmono-system-data-datasetextensions4.0-cil \
libmono-system-web-extensions4.0-cil \
libmono-system-management4.0-cil \
libmono-system-xml-linq4.0-cil \
libmono-corlib4.5-cil \
libmono-windowsbase4.0-cil \
libmono-system-io-compression4.0-cil \
libmono-system-io-compression-filesystem4.0-cil \
libmono-system-runtime4.0-cil \
mono-devel \
clang-3.8 \
build-essential \
xdg-user-dirs
RUN apt-get install -y --no-install-recommends \
xterm mesa-utils
#user Setting
#RUN useradd -ms /bin/bash simulator
#RUN echo 'simulator:simulator' | chpasswd
#RUN adduser simulator sudo
# Replace 1000 with your user / group id
ENV USERNAME simulator
RUN export uid=1000 gid=1000 && \
mkdir -p /home/$USERNAME && \
echo "$USERNAME:x:${uid}:${gid}:$USERNAME,,,:/home/$USERNAME:/bin/bash" >> /etc/passwd && \
echo "$USERNAME:x:${uid}:" >> /etc/group && \
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USERNAME && \
chmod 0440 /etc/sudoers.d/$USERNAME && \
chown ${uid}:${gid} -R /home/$USERNAME
RUN echo 'simulator:simulator' | chpasswd
# Graphics Dependencies
COPY ./Data/NVIDIA-Linux-x86_64-390.48.run /home/simulator/
WORKDIR /home/simulator
RUN chmod +x NVIDIA-Linux-x86_64-390.48.run
RUN ./NVIDIA-Linux-x86_64-390.48.run -s -N --no-kernel-module
# Clean Up
RUN apt-get clean -y && \
apt-get autoremove -y && \
rm -rf /tmp/* /var/tmp/* && \
rm -rf /var/lib/apt/lists/*
#USER root
USER $USERNAME
WORKDIR /home/$USERNAME
ENV HOME /home/$USERNAME
---------------------------------------------------------------------------------
1.How to Build (dockerfile)
$ sudo docker build --tag simulator:0.1 . $ sudo docker run -it --name="SimBase" simulator:0.1 /bin/bash $ (docker) exit $ sudo docker commit -a "Angler <jjangwani@nate.com>" -m "add exectute Files" SimBase simulator:1.0
2. How to use
$ sudo docker run -it --rm \ -v /run/user/1000:/run/user/1000 \ -v /dev:/dev \ -v /usr:/usr \ -v /lib/modules:/lib/modules \ -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ -v /home/angler/TESTCASE:/home/simulator/TESTCASE \ --device /dev/nvidia0:/dev/nvidia0 \ --device /dev/nvidiactl:/dev/nvidiactl \ --device /dev/nvidia-uvm:/dev/nvidia-uvm \ --privileged --ipc=host \ -e DISPLAY=$DISPLAY -e XDG_RUNTIME_DIR=/run/user/1000 \ --name="sim" \ -p 9001:9001 -p 9002:9002 \ simulator:1.0 \ /home/simulator/start.sh "/Game/Map/ACC_SampleMap /home/simulator/TESTCASE/TC_FUZZ_00.json /home/simulator/TESTCASE/TC_FUZZ_01.json"
3. More Infomation
admin ID : root admin PASS : root
User ID : simulator USER PASS : simulator