Installation¶
DeepReg uses in Python 3.7 and external python dependencies are defined in requirements. DeepReg primarily supports and is regularly tested with Ubuntu and Debian Linux distributions.
There are multiple different methods to install DeepReg:
Clone DeepReg and create a virtual environment using Anaconda / Miniconda (recommended).
Clone DeepReg and build a docker image using the provided docker file.
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 https://github.com/DeepRegNet/DeepReg.git
cd DeepReg
Then, install or update the conda environment following the instructions below. Please see the official conda documentation for more details.
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
Update DeepReg without GPU support.
conda env update -f environment_cpu.yml
Update DeepReg with GPU support.
conda env update -f environment.yml
Install DeepReg without GPU support.
conda env create -f environment_cpu.yml
conda activate deepreg
Update DeepReg without GPU support.
conda env update -f environment_cpu.yml
Install/update DeepReg with GPU support.
Warning
Not supported or tested.
Install/update DeepReg without GPU support.
Warning
DeepReg on Windows is not fully supported. However, you can use the Windows Subsystem for Linux. Set up WSL and follow the DeepReg setup instructions for Linux.
Install/update DeepReg with GPU support.
Warning
Not supported or tested.
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 https://github.com/DeepRegNet/DeepReg.git
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
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 via PyPI¶
Please use the following command to install DeepReg directly from the PyPI release:
pip install deepreg
Note
All dependencies, APIs and command-line tools will be installed automatically via each 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.
Only released versions of DeepReg are available via PyPI release. Therefore it is different from the latest (unstable) version on GitHub.