-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
64 lines (48 loc) · 2.04 KB
/
Dockerfile
File metadata and controls
64 lines (48 loc) · 2.04 KB
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
FROM ubuntu:18.04
RUN apt-get update --fix-missing && \
apt-get upgrade -y
RUN TZ=America/New_York && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
RUN apt-get install wget unzip g++ git cmake cmake-curses-gui \
freeglut3-dev libxi-dev libxmu-dev liblapack-dev \
swig openjdk-8-jdk doxygen python3-dev python3-pip \
python3-tk python3-lxml python3-six python3-numpy -y
RUN echo 'export PATH=/opensim/opensim_install/bin:$PATH' >> ~/.bashrc && \
echo 'export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> ~/.bashrc
RUN mkdir /opensim && \
mkdir /opensim/opensim_build && \
mkdir /opensim/opensim_dependencies_install && \
mkdir /opensim/opensim_dependencies_build
RUN wget https://github.com/opensim-org/opensim-core/archive/4.1.zip && \
unzip 4.1.zip && \
mv ./opensim-core-4.1 /opensim/opensim-core && \
rm 4.1.zip
RUN cd /opensim/opensim_dependencies_build && \
cmake ../opensim-core/dependencies/ \
-DCMAKE_INSTALL_PREFIX='/opensim/opensim_dependencies_install' \
-DCMAKE_BUILD_TYPE=RelWithDebInfo && \
make -j8
RUN cd /opensim/opensim_build && \
cmake ../opensim-core -DCMAKE_INSTALL_PREFIX="/opensim/opensim_install" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DOPENSIM_DEPENDENCIES_DIR="/opensim/opensim_dependencies_install" \
-DBUILD_PYTHON_WRAPPING=ON \
-DBUILD_JAVA_WRAPPING=ON \
-DWITH_BTK=ON && \
make -j8
# TODO: figure out why two tests fail during build.
# RUN cd /opensim/opensim_build \
# && ctest -j8
RUN cd /opensim/opensim_build && \
make -j8 install
SHELL ["/bin/bash", "-c"]
RUN tar -czvf opensim.tar.gz /opensim
RUN cd /opensim/opensim_install/lib/python3.6/site-packages && \
python3 ./setup.py install
ENV LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/opensim/opensim_install/lib:/opensim/opensim_dependencies_install/simbody/lib'
ENV TINI_VERSION v0.16.1
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /usr/bin/tini
RUN chmod +x /usr/bin/tini
ENTRYPOINT [ "/usr/bin/tini", "--" ]
CMD [ "/bin/bash" ]