Installation#
CAREamics is a deep-learning library and we therefore recommend having GPU support as training the algorithms on the CPU can be very slow. MacOS users can also benefit from GPU-acceleration if they have the new chip generations (M1, M2, etc.).
Support is provided directly from PyTorch, and is still experimental for macOS.
Step-by-step#
We recommend using mamba (miniforge) to install all packages in a virtual environment. As an alternative, you can use conda (miniconda).
- Open the terminal and type
mamba
to verify that mamba is available. -
Create a new environment:
-
Install PyTorch following the official instructions
As an example, our test machine requires:
-
Verify that the GPU is available:
python -c "import torch; print([torch.cuda.get_device_properties(i) for i in range(torch.cuda.device_count())])"
This should show a list of available GPUs. If the list is empty, then you will need to change the
pytorch
andpytorch-cuda
versions to match your hardware (linux and windows). -
Install CAREamics. We have several extra options (
dev
,examples
,wandb
andtensorboard
). If you wish to run the example notebooks, we recommend the following:
These instructions were tested on a linux virtual machine (RedHat 8.6) with a NVIDIA A40-8Q GPU.
- Open the terminal and type
mamba
to verify that mamba is available. -
Create a new environment:
-
Install PyTorch following the official instructions
As an example, our test machine requires:
Note that accelerated-training is only available on macOS silicon.
-
Install CAREamics. We have several extra options (
dev
,examples
,wandb
andtensorboard
). If you wish to run the example notebooks, we recommend the following:
Extra dependencies#
CAREamics extra dependencies can be installed by specifying them in brackets. In the previous section we installed careamics[examples]
. You can add other extra dependencies, for instance wandb
by doing:
Here is a list of the extra dependencies:
examples
: Dependencies required to run the example notebooks.wandb
: Dependencies to use WandB as a logger.tensorboard
: Dependencies to use TensorBoard as a logger.dev
: Dependencies required to run all the tooling necessary to develop with CAREamics.
Quickstart#
Once you have installed CAREamics, the easiest way to get started is to look at the applications for full examples and the guides for in-depth tweaking.