1 # Provide an easy-to-reproduce environment in which to test full Python functionality.
2 # Produce an image with GROMACS installed. Use the root of the repository as the build context
4 # Optionally, set `--build-arg DOCKER_CORES=N` for a Docker engine running with access to more than 1 CPU.
5 # REF=`git show -s --pretty=format:"%h"`
6 # docker build -t gmxapi/gromacs:${REF} --build-arg DOCKER_CORES=4 -f gromacs.dockerfile ../..
8 # This image serves as a base for integration with the gmxapi Python tools and sample code.
12 FROM gmxapi/gromacs-dependencies-$MPIFLAVOR:$REF
14 ENV SRC_DIR /tmp/gromacs-source
17 ENV BUILD_DIR /tmp/gromacs-build
18 RUN mkdir -p $BUILD_DIR
22 # Allow the build type to be specified with `docker build --build-arg TYPE=something`
24 # Note: AVX2 instructions not available in older docker engines.
26 -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs \
29 -DGMX_BUILD_HELP=OFF \
31 -DGMX_USE_RDTSCP=OFF \
33 -DCMAKE_BUILD_TYPE=$TYPE
34 RUN make -j$DOCKER_CORES
35 RUN make -j$DOCKER_CORES tests
36 RUN make -j$DOCKER_CORES install
38 # Default command provided for convenience since it inherits WORKDIR from above.