Skip to content

Commit 63f7df3

Browse files
authored
update install guide in readme (#30)
1 parent c5a4d46 commit 63f7df3

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,16 @@ A Python Library provides APIs to move PyTorch Tensors between CPU and NVMe.
1111

1212
This package is only supported on Linux. `liburing` and `libaio` can be automatically installed. `liburing` is supported on Linux >= `5.10`, and it won't be installed if the version of your Linux < `5.10`.
1313

14+
It will search `libaio` and `liburing` in `/usr/lib`, `/usr/lib64` and `$LD_LIBRARY_PATH`. If not found, backends will be installed in `~/.tensornvme`, and `~/.bashrc` will be modified to set `$LD_LIBRARY_PATH` correctly. **Please `source ~/.bashrc` after installation.** If you use other shells, please make sure `$LD_LIBRARY_PATH` is set correctly.
15+
1416
> You must install pytorch and cmake before installing tensornvme. Once you upgrade pytorch, remember to reinstall tensornvme.
1517
18+
### From source
19+
20+
```shell
21+
git clone https://github.com/hpcaitech/TensorNVMe.git && cd TensorNVMe
22+
```
23+
1624
First, install requirements:
1725
```shell
1826
pip install -r requirements.txt
@@ -33,13 +41,19 @@ To install `tensornvme` with only `libaio`:
3341
DISABLE_URING=1 pip install -v --no-cache-dir .
3442
```
3543

36-
It will search `libaio` and `liburing` in `/usr/lib`, `/usr/lib64` and `$LD_LIBRARY_PATH`. If not found, backends will be installed in `~/.tensornvme`, and `~/.bashrc` will be modified to set `$LD_LIBRARY_PATH` correctly. **Please `source ~/.bashrc` after installation.** If you use other shells, please make sure `$LD_LIBRARY_PATH` is set correctly.
37-
3844
If you want to install `libaio` or `liburing` for system:
3945
```shell
40-
WITH_ROOT=1 sudo -v --no-cache-dir .
46+
WITH_ROOT=1 sudo pip install -v --no-cache-dir .
47+
```
48+
Then they will be installed in `/usr` and `~/.bashrc` will not be modified. Make sure you have root access.
49+
50+
### From PIP
51+
52+
```shell
53+
pip install packaging
54+
pip install tensornvme
4155
```
42-
Then they will be installed in `/usr` and `~/.bashrc` will not be modified.
56+
All acceptable environment variables are the same as those when installing from source.
4357

4458
## CLI
4559

0 commit comments

Comments
 (0)