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`
25 -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs \
28 -DGMX_BUILD_HELP=OFF \
29 -DGMX_REQUIRE_VALID_TOOLCHAIN=TRUE \
30 -DCMAKE_BUILD_TYPE=$TYPE
31 RUN make -j$DOCKER_CORES
32 RUN make -j$DOCKER_CORES tests
33 RUN make -j$DOCKER_CORES install
35 # Default command provided for convenience since it inherits WORKDIR from above.