-
Notifications
You must be signed in to change notification settings - Fork 25
/
Dockerfile_trl
99 lines (80 loc) · 3.37 KB
/
Dockerfile_trl
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu16.04
SHELL ["/bin/bash", "-c"]
RUN apt-get update -y
# RUN apt-get install -y python3-dev python3-pip
RUN apt-get update --fix-missing
RUN apt-get install -y wget bzip2 ca-certificates git vim
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
premake4 \
git \
curl \
vim \
libav-tools \
libgl1-mesa-dev \
libgl1-mesa-glx \
libglew-dev \
libosmesa6-dev \
libxrender-dev \
libsm6 libxext6 \
unzip \
patchelf \
ffmpeg \
libxrandr2 \
libxinerama1 \
libxcursor1 \
python3-dev python3-pip graphviz \
freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev libglew1.6-dev mesa-utils
# Not sure why this is needed
ENV LANG C.UTF-8
# Not sure what this is fixing
# COPY ./files/Xdummy /usr/local/bin/Xdummy
# RUN chmod +x /usr/local/bin/Xdummy
ENV PATH /opt/conda/bin:$PATH
RUN wget --quiet https://repo.anaconda.com/archive/Anaconda2-2019.10-Linux-x86_64.sh -O /tmp/miniconda.sh && \
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh && \
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> /etc/bash.bashrc
RUN conda update -y --name base conda && conda clean --all -y
RUN conda create --name rlframe python=3.6.9 pip
RUN echo "source activate rlframe" >> ~/.bashrc
### alow conda to use env installed versio of pip
ENV PATH /opt/conda/envs/rlframe/bin:$PATH
RUN mkdir /root/playground
RUN mkdir /root/.ssh
WORKDIR /root/playground
RUN ls -l
# COPY id_rsa_remote_client /root/.ssh/id_rsa
# RUN chmod 600 ~/.ssh/id_rsa
# make sure your domain is accepted
RUN touch /root/.ssh/known_hosts
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
# RUN git clone [email protected]:FracturedPlane/RLSimulationEnvironments.git
RUN git clone https://github.com/FracturedPlane/RLSimulationEnvironments.git
ENV RLSIMENV_PATH /root/playground/RLSimulationEnvironments
WORKDIR /root/playground/RLSimulationEnvironments
RUN pip install --user -v -e $RLSIMENV_PATH
WORKDIR /root/playground
# [email protected]:UBCMOCCA/TerrainRLSim.git
RUN ls -la
RUN git clone https://github.com/UBCMOCCA/TerrainRLSim.git
ENV TERRAINRL_PATH /root/playground/TerrainRLSim
WORKDIR /root/playground/TerrainRLSim
RUN wget https://github.com/UBCMOCCA/TerrainRLSim/releases/download/0.8/TerrainRLSim_external_June_21_2019.tar.xz
RUN tar -xvf TerrainRLSim_external_June_21_2019.tar.xz
RUN chmod +x ./deb_deps.sh && ./deb_deps.sh
RUN cd external/caffe && make clean && make
RUN cp -r external/caffe/build/lib . && cp external/caffe/build/lib/libcaffe.* lib/ && cp external/Bullet/bin/*.so lib/ && cp external/jsoncpp/build/debug/src/lib_json/*.so* lib/
RUN cd simAdapter/ && apt-get install swig3.0 python3-dev python3-pip -y && chmod +x ./gen_swig.sh && ./gen_swig.sh
RUN ls -la
RUN chmod +x ./premake4_linux && ./premake4_linux gmake
RUN cd gmake && make config=release64 -j 6
RUN pip install --user -v -e $TERRAINRL_PATH
RUN pip install -r requirements.txt
WORKDIR /root/playground
# RUN ls
# RUN git clone [email protected]:Neo-X/RL-Framework.git /root/playground/RL-Framework
# RUN pip install -r /root/playground/RL-Framework/requirements.txt
# RUN popd
RUN ls