Skip to content

Commit

Permalink
Add napari placeholder, improve installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeschamps committed Oct 22, 2024
1 parent 88e4ca6 commit e548d2d
Show file tree
Hide file tree
Showing 10 changed files with 150 additions and 15 deletions.
Empty file added docs/guides/dev_resources/CI.md
Empty file.
Empty file.
52 changes: 49 additions & 3 deletions docs/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,51 @@ We also provide a command-line interface and developer resources!
</a>
</div>
<!-- New row -->
<div class="responsive-grid">
<!-- Installation -->
<a class="card-wrapper" href="napari_plugin">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "device-desktop.svg"
</span>
</div>
<div class="card-content">
<h5>napari plugin</h5>
<p>
A UI interface for CAREamics in the popular
napari image viewer, allowing training,
predicting and saving models on your
own data.
</p>
</div>
</div>
</div>
</a>
<!-- Installation -->
<a class="card-wrapper" href="tutorials">
<div class="card">
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "repo.svg"
</span>
</div>
<div class="card-content">
<h5>Tutorials</h5>
<p>
Thematic tutorials on various ways to use
and apply CAREamics algorithms, from data
inspection to using CAREamics in other
tools.
</p>
</div>
</div>
</div>
</a>
</div>
<!-- New row -->
<div class="responsive-grid">
<!-- Installation -->
<a class="card-wrapper" href="cli">
Expand All @@ -86,14 +131,15 @@ We also provide a command-line interface and developer resources!
<div class="card-body">
<div class="logo">
<span class="twemoji">
--8<-- "repo.svg"
--8<-- "law.svg"
</span>
</div>
<div class="card-content">
<h5>Developer resources</h5>
<p>
More insights on how CAREamics is organized and how
to tweak it to your needs.
More details on how the documentation is set up,
and guidelines for modifying and contributing to
CAREamics.
</p>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions docs/guides/napari_plugin/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# napari plugin


!!! warning "Work in progress"
These pages are still under construction.
5 changes: 5 additions & 0 deletions docs/guides/tutorials/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Tutorials


!!! warning "Work in progress"
These pages are still under construction.
93 changes: 82 additions & 11 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,24 @@ description: Installation instructions
# 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.).
training the algorithms on the CPU can be very slow.

Support is provided directly from PyTorch, and is still experimental for macOS.
We currently do not provide support for macOS silicon (M1, M2, etc.) for accelerated
training, but we will in the near future investigate how to install and train
CAREamics on silicon-arm.



## Step-by-step

We recommend using [mamba (miniforge)](https://github.com/conda-forge/miniforge#download)
to install all packages in a virtual environment. As an alternative, you can use
[conda
(miniconda)](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html).
(miniconda)](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html)
with the same commands (replacing `mamba` by `conda`).


## CAREamics library step-by-step

This section install CAREamics for use in your own library or tool, via jupyter notebook
or as scripts. For the napari plugin, refer to the next section.

=== "Linux and Windows"
1. Open the terminal and type `mamba` to verify that mamba is available.
Expand Down Expand Up @@ -75,10 +79,10 @@ to install all packages in a virtual environment. As an alternative, you can use
As an example, our test machine requires:

``` bash
mamba install pytorch::pytorch torchvision torchaudio -c pytorch
mamba install pytorch::pytorch torchvision -c pytorch
```

:warning: Note that accelerated-training is only available on macOS silicon.
:warning: Note that we currently do not support silicon arm accelerated training.

4. Install CAREamics. We have several extra options (`dev`, `examples`, `wandb`
and `tensorboard`). If you wish to run the [example notebooks](https://github.com/CAREamics/careamics-examples),
Expand All @@ -105,8 +109,75 @@ Here is a list of the extra dependencies:
- `tensorboard`: Dependencies to use [TensorBoard](https://pytorch.org/tutorials/recipes/recipes/tensorboard_with_pytorch.html) as a logger.
- `dev`: Dependencies required to run all the tooling necessary to develop with CAREamics.

## Quickstart
### Quickstart

Once you have [installed CAREamics](installation.md), the easiest way to get started
is to look at the [applications](applications/index.md) for full examples and the
[guides](guides/index.md) for in-depth tweaking.
[guides](guides/index.md) for in-depth tweaking.


## CAREamics napari plugin
For the napari plugin, refer to the next section.

=== "Linux and Windows"
1. Open the terminal and type `mamba` to verify that mamba is available.
2. Create a new environment:

``` bash
mamba create -n careamics python=3.10
mamba activate careamics
```

3. Install PyTorch following the [official
instructions](https://pytorch.org/get-started/locally/)

As an example, our test machine requires:

``` bash
mamba install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia
```

4. Verify that the GPU is available:
``` bash
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` and `pytorch-cuda` versions to match your
hardware (linux and windows).

5. Install CAREamics napari plugin and napari:

``` bash
pip install careamics-napari "napari[all]"
```

These instructions were tested on a linux virtual machine (RedHat 8.6) with a
NVIDIA A40-8Q GPU.

=== "macOS"
1. Open the terminal and type `mamba` to verify that mamba is available.
2. Create a new environment:

``` bash
mamba create -n careamics python=3.10
mamba activate careamics
```

3. Install PyTorch following the [official
instructions](https://pytorch.org/get-started/locally/)

As an example, our test machine requires:

``` bash
mamba install pytorch::pytorch torchvision -c pytorch
```

:warning: Note that we currently do not support silicon arm accelerated training.

4. Install CAREamics napari plugin and napari:

``` bash
pip install careamics-napari "napari[all]"
```
2 changes: 2 additions & 0 deletions docs/overrides/.icons/octicons/device-desktop.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/overrides/.icons/octicons/law.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ nav:
- guides/careamist_api/usage/prediction.md
- guides/careamist_api/usage/model_export.md
- FAQ: guides/careamist_api/faq.md
- napari plugins:
- guides/napari_plugin/index.md
- Tutorials:
- guides/turotials/index.md
- Lightning API:
- guides/lightning_api/index.md
- guides/lightning_api/lightning_module.md
Expand Down
3 changes: 2 additions & 1 deletion scripts/git_repositories.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
https://github.com/CAREamics/careamics
https://github.com/CAREamics/careamics-portfolio
https://github.com/CAREamics/careamics-portfolio
https://github.com/CAREamics/careamics-napari

0 comments on commit e548d2d

Please sign in to comment.