You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/inference.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,9 @@ SLEAP-NN provides powerful inference capabilities for pose estimation with suppo
8
8
!!! info "Using uv workflow"
9
9
This section assumes you have `sleap-nn` installed. If not, refer to the [installation guide](installation.md).
10
10
11
-
- If you're using the `uvx` workflow, you do **not** need to install anything; just run:
12
-
13
-
`uvx sleap-nn[torch-cpu] track ...`
14
-
15
-
(See [installation using uvx](installation.md#installation-using-uvx) for more details.)
11
+
- If you're using the `uvx` workflow, you do **not** need to install anything. (See [installation using uvx](installation.md#installation-using-uvx) for more details.)
16
12
17
-
- If you are using `uv sync`, add `uv run` as a prefix to all CLI commands shown below, for example:
13
+
- If you are using `uv sync` or `uv pip` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
Copy file name to clipboardExpand all lines: docs/installation.md
+41-7Lines changed: 41 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@
3
3
**Prerequisites:** Python 3.11+ (required for all installation methods)
4
4
5
5
!!! tip "Choose Your Installation Method"
6
-
- **[Installation as a system-wide tool with uv](#installation-as-a-system-wide-tool-with-uv)**: Use `uv tool install` to install sleap-nn globally as a CLI tool
6
+
- **[Installation as a system-wide tool with uv](#installation-as-a-system-wide-tool-with-uv)**: **(Recommended)**Use `uv tool install` to install sleap-nn globally as a CLI tool
7
7
- **[Installation with uvx](#installation-with-uvx)**: Use `uvx` for one-off commands (no installation needed)
8
8
- **[Installation with uv pip](#installation-with-uv-pip)**: Use `uv pip` to install from pypi in a uv virtual env.
9
9
- **[Installation with pip](#installation-with-pip)**: Use `pip` to install from pypi in a conda env. (Recommended to use with a conda env)
10
-
- **[Installation from source](#development-setup-with-uv)**: Use `uv sync` to install from source (for developmental purposes)
10
+
- **[Installation from source](#installation-from-source)**: Use `uv sync` to install from source (for developmental purposes)
11
11
12
12
---
13
13
@@ -43,14 +43,21 @@
43
43
44
44
=== "macOS"
45
45
```bash
46
-
uv tool install sleap-nn[torch]
46
+
uv tool install "sleap-nn[torch]"
47
47
```
48
48
49
49
!!! info
50
50
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
51
51
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
52
52
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
53
53
54
+
### Verify installation
55
+
56
+
```bash
57
+
# Test the installation
58
+
sleap-nn --help
59
+
```
60
+
54
61
---
55
62
56
63
## Installation with uvx
@@ -105,7 +112,7 @@
105
112
106
113
## Installation with uv pip
107
114
108
-
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs sleap-nn using `uv pip`.
115
+
This method creates a dedicated project environment using uv's modern Python project management. It initializes a new project with `uv init`, creates an isolated virtual environment with `uv venv`, and installs sleap-nn using `uv pip`. To use all installed packages, you must run commands with `uv run` (e.g., `uv run sleap-nn train ...` or `uv run pytest ...`).
109
116
110
117
!!! note "Install and set-up uv"
111
118
Step-1: Install [`uv`](https://github.com/astral-sh/uv) - a fast Python package manager:
@@ -141,20 +148,45 @@ This method creates a dedicated project environment using uv's modern Python pro
141
148
142
149
=== "macOS"
143
150
```bash
144
-
uv pip install sleap-nn[torch]
151
+
uv pip install "sleap-nn[torch]"
145
152
```
146
153
147
154
!!! info
148
155
- For more information on which CUDA version to use for your system, see the [PyTorch installation guide](https://pytorch.org/get-started/locally/).
149
156
The `--extra-index-url` in the install command should match the CUDA version you need (e.g., `https://download.pytorch.org/whl/cuda118` for CUDA 11.8, `https://download.pytorch.org/whl/cuda128` for CUDA 12.8, etc.).
150
157
- On macOS, MPS (Metal Performance Shaders) is automatically enabled for Apple Silicon acceleration.
151
158
159
+
### Verify Installation
160
+
161
+
```bash
162
+
# Test the installation
163
+
uv run sleap-nn --help
164
+
```
165
+
166
+
!!! warning "sleap-nn not recognized after installation?"
167
+
168
+
If running the verification step above gives an error like `sleap-nn: command not found` or `'sleap-nn' is not recognized as an internal or external command`, try the following workarounds:
169
+
170
+
- Activate your virtual environment (the venv name should be the same as your current working dir name). If you used `uv`, activate it and then run:
171
+
```bash
172
+
uv run --active sleap-nn --help
173
+
```
174
+
This ensures the command runs in the correct environment.
175
+
176
+
- **Another workaround (not recommended):**
177
+
Check if you have any *empty* `pyproject.toml` or `uv.lock` files in `Users/<your-user-name>`. If you find empty files with these names, delete them and try again. (Empty files here can sometimes interfere with uv's environment resolution.)
178
+
152
179
---
153
180
154
181
## Installation with pip
155
182
156
183
We recommend creating a dedicated environment with [conda](https://docs.conda.io/en/latest/miniconda.html) or [mamba/miniforge](https://github.com/conda-forge/miniforge) before installing `sleap-nn` with pip. This helps avoid dependency conflicts and keeps your Python setup clean. After installing Miniconda or Miniforge, create and activate an environment, then run the pip install commands below inside the activated environment.
157
184
185
+
To create a conda environment, run:
186
+
```bash
187
+
conda create -n sleap-nn-env python=3.12
188
+
conda activate sleap-nn-env
189
+
```
158
190
159
191
### Platform-Specific Installation
160
192
@@ -174,7 +206,7 @@ We recommend creating a dedicated environment with [conda](https://docs.conda.io
Copy file name to clipboardExpand all lines: docs/training.md
+2-6Lines changed: 2 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,9 @@
7
7
!!! info "Using uv workflow"
8
8
This section assumes you have `sleap-nn` installed. If not, refer to the [installation guide](installation.md).
9
9
10
-
- If you're using the `uvx` workflow, you do **not** need to install anything; just run:
11
-
12
-
`uvx sleap-nn[torch-cpu] train ...`
13
-
14
-
(See [installation using uvx](installation.md#installation-using-uvx) for more details.)
10
+
- If you're using the `uvx` workflow, you do **not** need to install anything. (See [installation using uvx](installation.md#installation-using-uvx) for more details.)
15
11
16
-
- If you are using `uv sync`, add `uv run` as a prefix to all CLI commands shown below, for example:
12
+
- If you are using `uv sync` or `uv pip` installation methods, add `uv run` as a prefix to all CLI commands shown below, for example:
0 commit comments