forked from samuelflores/MMB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
104 lines (85 loc) · 4.78 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
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
100
101
102
103
104
#Download base image ubuntu 18.04.3
FROM ubuntu:18.04 as OSSetup
#the way to override this is
# docker build --build-arg GIT_COMMIT=`git rev-parse HEAD`
#ARG GIT_COMMIT=83c4aeadeed0a9644b24f13808c068a4d51531a0
# this is an old commit
ARG GIT_COMMIT=
ARG GIT_COMMIT=b977ebfdd1928ce4f35d426215f68c09569bc1ce
LABEL git_commit=$GIT_COMMIT
RUN apt-get update && apt-get install -y apt-utils cmake cmake-curses-gui g++ vim doxygen swig python libblas-dev liblapack-dev git-core subversion mc wget zlib1g zlib1g-dev
#RUN apt-get install -y mc
WORKDIR /
#RUN cd /
RUN mkdir /github /svn
# Removed openmm from here. This is because openmm is now forked into MMB, with an eye to debian packaging.
#RUN mkdir /svn
#//RUN git clone https://github.com/pandegroup/openmm.git /github/openmm
RUN git clone -b simbody-3.7 --single-branch https://github.com/simbody/simbody.git /github/simbody
RUN git clone https://github.com/seqan/seqan.git /github/seqan
#RUN svn checkout https://simtk.org/svn/molmodel/trunk /svn/molmodel
RUN git clone https://github.com/samuelflores/molmodel.git /github/molmodel
RUN mkdir /Documentation
WORKDIR /Documentation
# Get the MMB reference guide from its repository on pe1:
RUN wget http://pe1.scilifelab.se/MMB-annex/Documentation/MMB.3_0.Reference-Guide.pdf
RUN wget http://pe1.scilifelab.se/MMB-annex/Documentation/MMB.3_2.tutorial.pdf
RUN wget http://pe1.scilifelab.se/MMB-annex/Documentation/MMB.3_2.tutorial.docx
#run mkdir /github/simbody/build ; cd /github/simbody/build ; cmake .. ; make install
RUN mkdir /github/simbody/build
#; cd /github/simbody/build ; cmake .. ; make install
WORKDIR /github/simbody/build
RUN cmake ..
#install prefix is /usr/local
RUN make install
# MMB part
RUN git clone https://github.com/samuelflores/MMB.git /github/MMB
# Now openmm will install from MMB repo:
RUN mkdir /github/MMB/3rdparty/openmm/build
WORKDIR /github/MMB/3rdparty/openmm/build
RUN cmake ..
RUN make install
# default install directory is /usr/local/openmm
#WORKDIR /github/MMB
# in the case of MMB 3.0:
##############
### Gemmi Part
##############
WORKDIR /github
RUN git clone https://github.com/project-gemmi/gemmi.git
##################
### Molmodel
##################
#RUN mkdir /svn/molmodel/build
#WORKDIR /svn/molmodel/build
RUN mkdir /github/molmodel/build
WORKDIR /github/molmodel/build
RUN cmake -DUSE_GEMMI=TRUE -DGEMMI_PATH=/github/gemmi/include -DSimbody_DIR=/usr/local/lib/cmake/simbody/ -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_TESTING_SHARED=OFF -DBUILD_TESTING_STATIC=OFF ..
#RUN cmake -DUSE_GEMMI=FALSE -DSimbody_DIR=/usr/local/lib/cmake/simbody/ -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DBUILD_TESTING_SHARED=OFF -DBUILD_TESTING_STATIC=OFF ..
RUN make install
#RUN git -C /github/MMB checkout $GIT_COMMIT
RUN mkdir /github/MMB/build
WORKDIR /github/MMB/build
RUN git pull --all
RUN cmake -DBuild_GEMMI=TRUE -DGEMMI_INCLUDE_DIR=/github/gemmi/include -DLepton_INCLUDE_DIR=/github/MMB/3rdparty/Lepton1.3/include -DOpenMM_INSTALL_DIR=//usr/local/openmm -DOpenMM_INCLUDE_DIR="/usr/local/openmm/include/openmm/reference/;/usr/local/openmm/include/openmm/;/usr/local/openmm/include" -DCMAKE_BUILD_TYPE=Release -DSeqAn_INCLUDE_DIR=/github/seqan/include -DCMAKE_CXX_FLAGS="-std=c++14 -D BuildNtC -D USE_OPENMM" -DSimTK_INSTALL_DIR=/usr/local -DSimbody_DIR=/usr/local/lib/cmake/simbody/ -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local ..
#RUN cmake -DBuild_GEMMI=FALSE -DLepton_INCLUDE_DIR=/github/MMB/3rdparty/Lepton1.3/include -DOpenMM_INSTALL_DIR=//usr/local/openmm -DOpenMM_INCLUDE_DIR="/usr/local/openmm/include/openmm/reference/;/usr/local/openmm/include/openmm/;/usr/local/openmm/include" -DCMAKE_BUILD_TYPE=Release -DSeqAn_INCLUDE_DIR=/github/seqan/include -DCMAKE_CXX_FLAGS="-std=c++14 -D BuildNtC -D USE_OPENMM" -DSimTK_INSTALL_DIR=/usr/local -DSimbody_DIR=/usr/local/lib/cmake/simbody/ -DCMAKE_PREFIX_PATH=/usr/local -DCMAKE_INSTALL_PREFIX=/usr/local ..
RUN touch /github/MMB/build/done-cmake.txt
RUN make install
RUN rm MMB libMMBlib.so
ENV LD_LIBRARY_PATH /usr/local/lib
ENV PATH "/usr/local/bin:$PATH"
WORKDIR /work
RUN cp /github/MMB/include/resources/parameters.csv .
#RUN mv /github/MMB/docker/Dockerfile /
# Trying multi-stage build. first, get a clean ubuntu image:
#FROM ubuntu:18.04 as final
#run mkdir /github
#run mkdir /svn
#COPY --from=OSSetup /github/* /github/
#COPY --from=OSSetup /svn/* /svn/
#COPY --from=OSSetup /usr/local/* /usr/local/
#run echo "Y" | apt-get update
#run apt-get install -y libblas-dev liblapack-dev
#run apt-get install -y git-core
#ENV LD_LIBRARY_PATH /usr/local/lib
#ENV PATH "/usr/local/bin:$PATH"