Right now there are:
nmrlipids/gromacs: This is the base gromacs image, only contains gromacs.
Then we have one image extending this gromacs base:
nmrlipids/core: features everything developers need to work on the project
We provide a Docker-based development environment that allows for easy testing of new code and features. This method is recommended for development and testing purposes.
Before using the Docker-based development environment, you'll need to have Docker installed on your system:
- Linux: Follow the official Docker installation guide for Linux: https://docs.docker.com/engine/install/
- macOS: Download and install Docker Desktop for Mac from https://www.docker.com/products/docker-desktop/
- Windows: Download and install Docker Desktop for Windows from https://www.docker.com/products/docker-desktop/ (requires Windows Subsystem for Linux)
Go to the directory where you have the fairmd-lipids repository. Then,
-
Download the latest fairmd-lipids core image:
docker pull nmrlipids/core:latest -
Alternatively the Docker image can be built locally:
docker build -t NAME_OF_THE_DOCKER_IMAGE . -
Initialize the submodule data:
git submodule update --init
-
Start the container with your code mounted:
docker run -it -v $(pwd):/github/workspace NAME_OF_THE_DOCKER_IMAGEor if you pulled the latest image,
docker run -it -v $(pwd):/github/workspace fairmd-lipids/core:latest -
Inside the container:
# Install base requirements and the fairmd-lipids package in editable mode pip install -e . # Run tests ./runtests.sh ./runtests-regression.sh
You can specify additional arguments to the
pytestviatox -e testsFor full list of accepted flags, please look at pytest documentation.
Do not forget to add this new package to the requirements.txt!
-
When done testing:
# Exit container exit
By default the core image features the dev requirements from this repository but you can easily create different testing environments with different dependencies:
-
Start container again:
docker run -it -v $(pwd):/workspace NAME_OF_THE_DOCKER_IMAGE -
Inside container, create a new virtual environment using Conda as previously described. (Must update this)
- Your local code changes are automatically reflected in the container since we use a volume mount
- You can run multiple test environments simultaneously by creating different virtual environments
- To see all running containers:
docker ps - To stop a container:
docker stop <container_id> - To remove all resources related to docker including images, container, build-resources:
docker system prune -a