|
1 | 1 | # Installation and Updating
|
2 | 2 |
|
3 |
| -The library is currently available for Python versions 3.9 through 3.11. Support for |
4 |
| -future versions |
5 |
| -will be added when possible. |
| 3 | +## Requirements |
6 | 4 |
|
7 |
| -New versions of the tool are occasionally released to improve segmentation performance, |
8 |
| -speed, and the user interface of the tool. Changes are published to the PyPI and |
9 |
| -Anaconda repositories using [semantic versioning](https://semver.org/). You may want to |
10 |
| -occasionally run the update commands to ensure that you're using the most up-to-date |
11 |
| -version of `kelp-o-matic`. |
| 5 | +Kelp-o-Matic is currently available for Python versions 3.10 through 3.13. |
12 | 6 |
|
13 |
| -## Commands |
| 7 | +## Quick Install |
| 8 | + |
| 9 | +=== "PIP" |
| 10 | + |
| 11 | + ```bash |
| 12 | + pip install kelp-o-matic |
| 13 | + ``` |
| 14 | + |
| 15 | +=== "Conda" |
| 16 | + |
| 17 | + ```bash |
| 18 | + conda install -c conda-forge kelp-o-matic |
| 19 | + ``` |
14 | 20 |
|
15 | 21 | !!! help "Need more help?"
|
16 | 22 |
|
17 | 23 | If you are unfamiliar with the command line or installing Python packages, you may
|
18 | 24 | find our [Beginner Guide](beginner_guide/index.md) helpful.
|
19 | 25 |
|
20 |
| -### Pre-requisites |
| 26 | +## Recommended Installation (Virtual Environment) |
21 | 27 |
|
22 |
| -Install `pytorch` and `torchvision` for your operating system using the |
23 |
| -[official installation instructions here](https://pytorch.org/). |
24 |
| -Make sure you select "CUDA" as the compute platform if you have an NVIDIA GPU you'd like |
25 |
| -to use to improve performance. |
| 28 | +It is recommended to install Kelp-o-Matic in a virtual environment to avoid conflicts |
| 29 | +with other Python packages present on your system. `uv` is our recommended environment manager |
| 30 | +(a faster alternative to `venv`/`virtualenv`), but you can use any Python environment manager you prefer. |
26 | 31 |
|
27 |
| -=== "PIP" |
| 32 | +**UV Virtual Environment Setup** |
28 | 33 |
|
29 |
| - ### Install |
| 34 | +1. Install `uv` using their [installation instructions](https://docs.astral.sh/uv/getting-started/installation/). |
30 | 35 |
|
| 36 | +2. Create a new virtual environment (you can replace `kom-env` with a different name if you prefer): |
31 | 37 | ```bash
|
32 |
| - pip install kelp-o-matic |
| 38 | + uv venv kom-env |
33 | 39 | ```
|
34 | 40 |
|
35 |
| - ### Update |
| 41 | +3. Activate the virtual environment |
| 42 | + |
| 43 | + === "Windows" |
| 44 | + ```powershell |
| 45 | + kom-env\Scripts\activate |
| 46 | + ``` |
| 47 | + |
| 48 | + === "MacOS/Linux" |
| 49 | + ```bash |
| 50 | + source kom-env/bin/activate |
| 51 | + ``` |
| 52 | + |
| 53 | +4. Install Kelp-o-Matic and its dependencies |
36 | 54 |
|
37 | 55 | ```bash
|
38 |
| - pip install --upgrade kelp-o-matic |
| 56 | + uv pip install kelp-o-matic |
39 | 57 | ```
|
40 | 58 |
|
41 |
| -=== "Conda" |
| 59 | +5. If you want to deactivate the virtual environment, run |
| 60 | + |
| 61 | + ```bash |
| 62 | + deactivate |
| 63 | + ``` |
| 64 | + |
| 65 | + It will deactivate automatically when you close the terminal. To reactivate, just run `source kom-env/bin/activate` |
| 66 | + (you don't have to reinstall Kelp-o-Matic though). |
| 67 | +
|
| 68 | +!!! important |
| 69 | +
|
| 70 | + The `kom` command will be available only when the virtual environment is activated. |
| 71 | +
|
| 72 | +## Verify Installation |
| 73 | +
|
| 74 | +To verify that Kelp-o-Matic was installed correctly and to check the installed version, run: |
| 75 | +
|
| 76 | +```bash |
| 77 | +kom --version |
| 78 | +``` |
| 79 | +
|
| 80 | +If you have an Nvidia GPU, you can check if it is detected with: |
| 81 | +
|
| 82 | +```bash |
| 83 | +kom --gpu-test |
| 84 | +``` |
42 | 85 |
|
43 |
| - ### Install |
| 86 | +## Updating |
| 87 | +
|
| 88 | +We follow [semantic versioning](https://semver.org/). Regular updates are recommended for: |
| 89 | +
|
| 90 | +- Performance improvements |
| 91 | +- New features |
| 92 | +- Security patches |
| 93 | +
|
| 94 | +To update Kelp-o-Matic, you can use the following commands: |
| 95 | +
|
| 96 | +=== "PIP" |
44 | 97 |
|
45 | 98 | ```bash
|
46 |
| - conda install -c conda-forge kelp-o-matic |
| 99 | + pip install --upgrade kelp-o-matic |
47 | 100 | ```
|
48 | 101 |
|
49 |
| - ### Update |
| 102 | +=== "Conda" |
50 | 103 |
|
51 | 104 | ```bash
|
52 | 105 | conda update -c conda-forge kelp-o-matic
|
53 | 106 | ```
|
| 107 | +
|
| 108 | +## Next Steps |
| 109 | +
|
| 110 | +For available commands, see the [Command Line Interface](cli.md) documentation. |
0 commit comments