Skip to content

Commit 7271de4

Browse files
authored
Merge pull request #52 from juglab/napari4.18
Napari4.18
2 parents 40317fe + 7036723 commit 7271de4

5 files changed

Lines changed: 49 additions & 22 deletions

File tree

docs/installation.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ If you do not have conda, we recommend installing [miniconda](https://docs.conda
1414
operating system.
1515
3. Install `napari` and `napari-n2v`:
1616
```bash
17-
pip install "napari[all]==0.4.15" napari-n2v
17+
pip install "napari[all]" napari-n2v
1818
```
1919

20-
> Note: napari-n2v was tested with TensorFlow 2.7 and 2.10, cuda 11.2 and cudnn
21-
> 8.1.
20+
> Note: napari-n2v was tested with TensorFlow 2.10 (cuda 11.2 and cudnn 8.1) and
21+
TensorFlow 2.13 (cuda 11.8 and cudnn 8.6) on a Linux machine (NVIDIA A40-16Q GPU).
2222

2323
> **Important**: In order to access the GPU with Tensorflow, it is necessary to
2424
> export the CUDA library path in your conda environment. Installation
2525
> instructions on the TensorFlow website do just that.
26+
2627
> For TF 2.10, we recommand running the following in your environment:
2728
> ```bash
2829
> mkdir -p $CONDA_PREFIX/etc/conda/activate.d
2930
> echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
3031
> ```
3132
33+
> If you encounter the following problem with TF 2.13: "DNN library is not found", you
34+
> can try to run in your environment:
35+
> ```bash
36+
> CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
37+
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
38+
> ```
3239
3340
## macOS
3441
@@ -37,7 +44,7 @@ operating system.
3744
3845
1. Set up env with napari and pyqt5
3946
```bash
40-
conda create -n napari-n2v -c conda-forge python=3.9 pyqt imagecodecs napari=0.4.15
47+
conda create -n napari-n2v -c conda-forge python=3.9 pyqt imagecodecs napari
4148
```
4249
2. Install tensorflow following [Apple's instructions](https://developer.apple.com/metal/tensorflow-plugin/)
4350
3. Install napari-n2v

envs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Test environments
2+
3+
These environments are used to test the code with different versions of TF in linux.
4+
They will fail on a macOS machine.
5+
6+
See the [documentation](https://juglab.github.io/napari-n2v/installation.html) for
7+
installation steps.

envs/tf_old_test_env.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: np-n2v
2+
channels:
3+
- conda-forge
4+
- nvidia
5+
- defaults
6+
dependencies:
7+
- python=3.9
8+
- cudatoolkit=11.3
9+
- cudnn=8.1
10+
- pip
11+
- pip:
12+
- tensorflow<2.12
13+
- "napari[all]"
14+
- napari-n2v

envs/tf_recent_test_env.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: np-n2v
2+
channels:
3+
- conda-forge
4+
- nvidia
5+
- defaults
6+
dependencies:
7+
- python=3.11
8+
- cudatoolkit=11.8.0
9+
- pip
10+
- pip:
11+
- nvidia-cudnn-cu11==8.6.0.163
12+
- tensorflow==2.13.*
13+
- "napari[all]"
14+
- napari-n2v

setup.cfg

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = napari-n2v
3-
version = 0.1.0
3+
version = 0.1.1
44
author = Tom Burke, Joran Deschamps
55
author_email = joran.deschamps@fht.org
66
url = https://github.com/juglab/napari-n2v
@@ -47,33 +47,18 @@ install_requires =
4747
napari_time_slicer >= 0.4.9
4848

4949
# Also compatibility with napari-workflows
50-
# TODO: it might be better to refactor the napari-workflow code to another repo that would call napari-n2 so that
51-
# TODO: the dependencies would be a bit more relaxed.
52-
# TODO: pin napari to <=0.4.15? vispy<=0.9.6?
5350
# pin napari and vispy because
5451
# https://github.com/napari/napari/issues/4415
5552
# https://github.com/napari/napari/issues/4708
56-
napari<=0.4.15
57-
vispy<=0.9.6
58-
magicgui
53+
napari
5954
qtpy
6055
pyqtgraph
6156

62-
# fix to prevent failing tests
63-
# see https://github.com/napari/napari/pull/5168
64-
# and https://github.com/napari/napari/commit/c42e5ee2d1afd1f26944de3c0657e7bbc813b7d1
65-
imageio>=2.5.0,!=2.11.0,!=2.22.1
66-
6757
# tensorflow
68-
tensorflow>=2.7.0; platform_system!="Darwin" or platform_machine!="arm64"
58+
tensorflow>=2.10.0; platform_system!="Darwin" or platform_machine!="arm64"
6959
tensorflow-macos; platform_system=="Darwin" and platform_machine=="arm64"
7060
tensorflow-metal; platform_system=="Darwin" and platform_machine=="arm64"
7161

72-
# protobuf is a dependency of TensorFlow but the latest versions (>3.20) generate
73-
# errors with npe2. As of TensorFlow 2.10, protobuf<3.20 and >=3.9.2 is enforced.
74-
# Here we set the requirements to be compatible with TF2.8 to TF2.10.
75-
protobuf<3.20,>=3.9.2
76-
7762
[options.extras_require]
7863
testing =
7964
pytest # https://docs.pytest.org/en/latest/contents.html

0 commit comments

Comments
 (0)