Installation¶
DeepReg is written in Python 3.7. Dependent external libraries provide core IO functionalities and other standard
processing tools. The dependencies for DeepReg are managed by
pip
.
Create a virtual environment¶
The recommended method is to install DeepReg in a dedicated virtual environment to avoid issues with other dependencies. The conda environment is recommended:
DeepReg primarily supports and is regularly tested with Ubuntu and Debian Linux distributions.
With CPU only
conda env create -f environment_cpu.yml
conda activate deepreg
With GPU
conda env create -f environment.yml
conda activate deepreg
With CPU only
conda env create -f environment_cpu.yml
conda activate deepreg
With GPU
Warning
Not supported or tested.
With CPU only
Warning
DeepReg on Windows is not fully supported. However, you can use the Windows Subsystem for Linux with CPU only. Set up WSL and follow the DeepReg setup instructions for Linux.
With GPU
Warning
Not supported or tested.
Use docker¶
We also provide the docker file for building the docker image.
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
where
-t
names the built image asdeepreg
.-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 the package directly¶
Install from the cloned local project
git clone https://github.com/DeepRegNet/DeepReg.git # clone the repository
cd DeepReg # change working directory to the DeepReg root directory
pip install -e . # install the package
Install from the PyPI release
pip install deepreg
Note
All dependencies, APIs and command-line tools will be installed automatically via either installation method. However, the PyPI release currently does not ship with test data and demos. Running examples in this documentation may require downloading test data and changing default paths to user-installed packages with the PyPI release. These examples include those in the Quick Start and DeepReg Demo.