CAMP 1.0.0
Chemistry Across Multiple Phases
Dockerfile
Go to the documentation of this file.
1FROM fedora:37
2
3RUN dnf -y update \
4 && dnf -y install \
5 gcc-gfortran \
6 gcc-c++ \
7 make \
8 metis-devel \
9 lapack-devel \
10 openblas-devel \
11 cmake \
12 && dnf clean all
13
14# Build the SuiteSparse libraries for sparse matrix support
15# (-k included because of problem with SuiteSparse security certificate - 1 Aug 2021)
16RUN curl -kLO http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-5.1.0.tar.gz \
17 && tar -zxvf SuiteSparse-5.1.0.tar.gz \
18 && export CXX=/usr/bin/cc \
19 && cd SuiteSparse \
20 && make install INSTALL=/usr/local BLAS="-L/lib64 -lopenblas"
21
22# Install json-fortran
23RUN curl -LO https://github.com/jacobwilliams/json-fortran/archive/6.1.0.tar.gz \
24 && tar -zxvf 6.1.0.tar.gz \
25 && cd json-fortran-6.1.0 \
26 && export FC=gfortran \
27 && mkdir build \
28 && cd build \
29 && cmake -D SKIP_DOC_GEN:BOOL=TRUE .. \
30 && make install
31
32# copy CVODE source
33COPY cvode-3.4-alpha.tar.gz /cvode-3.4-alpha.tar.gz
34
35# Install a modified version of CVODE
36RUN tar -zxvf /cvode-3.4-alpha.tar.gz \
37 && cd cvode-3.4-alpha \
38 && mkdir build \
39 && cd build \
40 && cmake -D CMAKE_BUILD_TYPE=release \
41 -D CMAKE_C_FLAGS_DEBUG="-g -pg" \
42 -D CMAKE_EXE_LINKER_FLAGS_DEBUG="-pg" \
43 -D CMAKE_MODULE_LINKER_FLAGS_DEBUG="-pg" \
44 -D CMAKE_SHARED_LINKER_FLAGS_DEBUG="-pg" \
45 -D KLU_ENABLE:BOOL=TRUE \
46 -D KLU_LIBRARY_DIR=/usr/local/lib \
47 -D KLU_INCLUDE_DIR=/usr/local/include \
48 .. \
49 && make install
50
51# copy CAMP source code and data
52COPY . /camp
53
54# Update environment variables
55ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib:/usr/local/lib64:/usr/local/jsonfortran-gnu-6.1.0/lib"
56ENV PATH="${PATH}:/usr/local/jsonfortran-gnu-6.1.0/lib"
57
58# Build CAMP
59 RUN mkdir build \
60 && cd build \
61 && export JSON_FORTRAN_HOME="/usr/local/jsonfortran-gnu-6.1.0" \
62 && cmake -D CMAKE_BUILD_TYPE=release \
63 -D CMAKE_C_FLAGS_DEBUG="-pg" \
64 -D CMAKE_Fortran_FLAGS_DEBUG="-pg" \
65 -D CMAKE_MODULE_LINKER_FLAGS="-pg" \
66 /camp \
67 && make install
68
69WORKDIR /build