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