Skip to content

Commit a05275b

Browse files
authored
Merge pull request #28 from PSDI-UK/jimboid-patch-1
Update Dockerfile
2 parents 30ae6d1 + 9c4fa3d commit a05275b

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

gromacs/Dockerfile

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,27 +33,17 @@ RUN wget ftp://ftp.gromacs.org/gromacs/gromacs-${GMX_VERSION}.tar.gz && \
3333
tar xvf gromacs-${GMX_VERSION}.tar.gz && \
3434
rm gromacs-${GMX_VERSION}.tar.gz
3535

36-
# Make a build dir in source dir.
36+
# Patch gmx with plumed and make build dir
3737
WORKDIR /tmp/gromacs-${GMX_VERSION}
38+
RUN plumed patch -p -e gromacs-2024.3
3839
RUN mkdir build
3940

4041
# Build gromacs without mpi and without cuda.
4142
WORKDIR /tmp/gromacs-${GMX_VERSION}/build
42-
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gromacs-${GMX_VERSION} \
43-
-DGMX_THREAD_MPI=OFF -DGMX_BUILD_OWN_FFTW=ON -DGMX_OPENMP=ON \
44-
-DGMXAPI=OFF -DCMAKE_BUILD_TYPE=Release
45-
RUN make -j8
46-
47-
# Patch gmx with plumed.
48-
WORKDIR /tmp/gromacs-${GMX_VERSION}
49-
RUN plumed patch -p -e gromacs-2024.3
43+
RUN cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gromacs-${GMX_VERSION} -DGMX_BUILD_OWN_FFTW=ON -DGMX_OPENMP=ON -DGMXAPI=OFF -DCMAKE_BUILD_TYPE=Release
5044

51-
# Recompile and install gromacs
52-
WORKDIR /tmp/gromacs-${GMX_VERSION}/build
5345
RUN make -j8
5446
RUN make install
55-
RUN rm -r /tmp/gromacs-${GMX_VERSION} && \
56-
fix-permissions "/opt/gromacs-${GMX_VERSION}"
5747

5848
# Cleanup and fix permissions.
5949
RUN rm -r /tmp/gromacs-${GMX_VERSION}
@@ -65,4 +55,4 @@ ENV PATH=/opt/gromacs-${GMX_VERSION}/bin:$PATH
6555

6656
# Switch back to USER aiida to avoid accidental container runs as root
6757
USER ${SYSTEM_UID}
68-
WORKDIR "${HOME}"
58+
WORKDIR "${HOME}"

0 commit comments

Comments
 (0)