Skip to content

Commit 0635203

Browse files
committed
Update README
1 parent 1a8e469 commit 0635203

1 file changed

Lines changed: 16 additions & 20 deletions

File tree

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Installation](#installation)
1414
- [Using `conda` (recommended)](#using-conda-recommended)
1515
- [Manually](#manually)
16+
- [For Developers](#for-developers)
1617
- [Usage](#usage)
1718
- [Models](#models)
1819
- [Output Files](#output-files)
@@ -24,21 +25,28 @@
2425

2526
- C++ compiler with C++17 support
2627
- Python 3.10+
27-
- [cmake](https://mesonbuild.com/)
28+
- [cmake](https://cmake.org/)
2829
- [btllib](https://github.com/BirolLab/btllib)
2930
- [libtorch for CPU](https://pytorch.org/)
3031
- [pybind11](https://github.com/pybind/pybind11)
32+
- [scikit-build-core](https://github.com/scikit-build/scikit-build-core)
3133
- [ntStat](https://github.com/BirolLab/ntStat)
3234
- [ntCard](https://github.com/BirolLab/ntCard)
3335
- [ntEdit](https://github.com/BirolLab/ntEdit)
3436

37+
38+
The `environment.yaml` file contains all the necessary dependencies for compiling AIEdit manually in a Conda environment:
39+
40+
```shell
41+
conda env create -f environment.yaml
42+
conda activate aiedit
43+
```
44+
3545
If you would like to train new models:
3646
- [PyTorch](https://pytorch.org/)
3747
- [torchinfo](https://github.com/TylerYep/torchinfo)
3848
- [tqdm](https://github.com/tqdm/tqdm)
3949

40-
For development, install [pybind11-stubgen](https://github.com/sizmailov/pybind11-stubgen) so the aiedit/core.pyi file will be updated in case of changes in the C++ bindings.
41-
4250
# Installation
4351

4452
## Using `conda` (recommended)
@@ -55,31 +63,19 @@ This will make the `aiedit` command available in the environment.
5563

5664
Build AIEdit in the `build` folder by running the following in the project's root folder:
5765

58-
```
59-
cmake -S . -B build
60-
cmake --build build
61-
```
62-
63-
This will put a `core*.so` file in the `aiedit` package, which can now be used by adding the project root to `$PYTHONPATH` and running:
64-
6566
```shell
66-
python -m aiedit
67+
pip install . --no-build-isolation
6768
```
6869

69-
Running `cmake --install build` will install AIEdit to your Python environment's `site-packages`, making `python -m aiedit` available without requiring changes to `$PYTHONPATH`.
70+
## For Developers
7071

71-
If PyTorch/libtorch are installed in a conda environment, you might have you update the `CMAKE_PREFIX_PATH` environment variable. To find PyTorch's CMake prefix path, run:
72+
If you are modifying the C++ or Python code and want your changes to reflect immediately, use an editable install:
7273

7374
```shell
74-
python -c "import torch; print(torch.utils.cmake_prefix_path)"
75+
pip install -e . --no-build-isolation
7576
```
7677

77-
Then, pass the result to CMake:
78-
79-
```shell
80-
cmake -DCMAKE_PREFIX_PATH=<TORCH_PREFIX_PATH> -S . -B build
81-
cmake --build build
82-
```
78+
Install [pybind11-stubgen](https://github.com/sizmailov/pybind11-stubgen) so the aiedit/core.pyi file will be updated in case of changes in the C++ bindings.
8379

8480
# Usage
8581

0 commit comments

Comments
 (0)