/
Dockerfile
55 lines (43 loc) · 1.67 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM ubuntu:18.04
#
# Note : This image is not configured for running on GPU
#
WORKDIR /
# Prerequisites settings
RUN apt-get update && \
apt-get install -y apt-utils git rsync
# Install Python
RUN apt-get install -y python3.6 && \
apt-get install -y python3-pip && \
pip3 install --upgrade pip
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
# Install Java 8 (JDK)
RUN apt-get install -y openjdk-8-jdk
ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Install Ray with TensorFlow 2.x
RUN pip3 install gym lxml numpy pillow && \
pip3 install tensorflow==2.4.1 ray[default]==1.6.0 ray[rllib]==1.6.0 ray[tune]==1.6.0 attrs==19.1.0 pandas
# Install Desktop Components for Headless
RUN apt-get install -y xvfb && \
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt-get install -y lxde
# Install Malmo
RUN pip3 install --index-url https://test.pypi.org/simple/ malmo==0.36.0
ENV MALMO_PATH=/malmo_package
WORKDIR $MALMO_PATH
RUN python3 -c "import malmo.minecraftbootstrap; malmo.minecraftbootstrap.download();"
ENV MALMO_XSD_PATH=$MALMO_PATH/MalmoPlatform/Schemas
WORKDIR /
# Install custom Gym env
RUN git clone https://github.com/tsmatz/minecraft-rl-on-ray-cluster
RUN cd minecraft-rl-on-ray-cluster && \
pip3 install Malmo_Maze_Sample/
# These are needed for Ray autoscaler for Azure
RUN pip3 install azure-mgmt-compute==14.0.0 && \
pip3 install azure-mgmt-core==1.3.0 && \
pip3 install azure-mgmt-msi==1.0.0 && \
pip3 install azure-mgmt-network==10.2.0 && \
pip3 install azure-mgmt-resource==13.0.0 && \
pip3 install azure-cli-core==2.22.0 && \
pip3 install knack
EXPOSE 6379 8265