DeepReg can be installed in Python 3.7 and external python dependencies are mainly defined in requirements. DeepReg primarily supports and is regularly tested with Ubuntu and Mac OS.

There are multiple different methods to install DeepReg:

  1. Clone DeepReg and create a virtual environment using Anaconda / Miniconda (recommended).

  2. Clone DeepReg and build a docker image using the provided docker file.

  3. Install directly from PyPI release without cloning DeepReg.

Install via Conda

The recommended method is to install DeepReg in a dedicated virtual environment using Anaconda / Miniconda.

Please clone DeepReg first and change current directory to the DeepReg root directory:

git clone
cd DeepReg

Then, install or update the conda environment following the instructions below. Please see the official conda documentation for more details.

Install prerequisites (Optional).

sudo apt-get update
sudo apt-get install graphviz

Install DeepReg without GPU support.

conda env create -f environment_cpu.yml
conda activate deepreg

Install DeepReg with GPU support.

conda env create -f environment.yml
conda activate deepreg

After activating the conda environment, please install DeepReg locally:

pip install -e .

Install via docker

We also provide the docker file for building the docker image. Please clone DeepReg repository first:

git clone

Then, install DeepReg following the instructions below.

Install docker

Docker can be installed following the official documentation.

For Linux based OS, there are some additional setup after the installation. Otherwise you might have permission errors.

Build docker image

docker build . -t deepreg -f Dockerfile


  • -t names the built image as deepreg.

  • -f provides the docker file for configuration.

Create a container

docker run --name <container_name> --privileged=true -ti deepreg bash

where - --name names the created container. - --privileged=true is required to solve the permission issue linked to TensorFlow profiler. - -it allows interaction with container and enters the container directly, check more info on stackoverflow.

Remove a container

docker rm -v <container_name>

which removes a created container and its volumes, check more info on docker documentation.

Install via PyPI

Please use the following command to install DeepReg directly from the PyPI release:

pip install deepreg

The PyPI release currently does not ship with test data and demos. Running examples, such as those in Quick Start and DeepReg Demo, in this documentation may require downloading additional test data.

Once you have installed DeepReg via pip, you can run the following command to download the necessary files to run all examples by:


The above will download the files to the current working directory. If you need to download to a specific directory, use the --output_dir or -d flag to specify this.


  1. All dependencies, APIs and command-line tools will be installed automatically via each installation method.

  2. Only released versions of DeepReg are available via PyPI release. Therefore it is different from the latest (unstable) version on GitHub.