Skip to content

Commit dddd06a

Browse files
committed
update readme with instructions for the installation using uv
1 parent aff8afc commit dddd06a

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

README.MD

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,17 @@ A complete documentation is provided [here](https://interdigitalinc.github.io/Co
3030

3131
## installation
3232

33+
The CompressAI library providing learned compresion modules is available as a submodule. It can be initilized by running:
34+
```
35+
git submodule update --init --recursive
36+
```
37+
Note: the installation scripts documented below installs compressai from source expects the submodule to be populated.
3338

34-
### initialization of the environment
39+
CompressAI-Vision can be installed using a virtual environment and pip or using uv.
40+
41+
### 1. Using a virtual environment:
42+
43+
#### Initialization of the environment
3544
To get started locally and install the development version of CompressAI-Vision, first create a [virtual environment](https://docs.python.org/3.8/library/venv.html) with python==3.8:
3645

3746
```
@@ -40,19 +49,13 @@ source ./venv/bin/activate
4049
pip install -U pip
4150
```
4251

43-
The CompressAI library providing learned compresion modules is available as a submodule. It can be initilized by running:
44-
```
45-
git submodule update --init --recursive
46-
```
47-
Note: the installation script documented below installs compressai from source expects the submodule to be populated.
48-
49-
### installation of compressai-vision and supported vision models:
52+
#### 2. installation of compressai-vision and supported vision models:
5053

5154
First, if you want to manually export CUDA related paths, please source (e.g. for CUDA 11.8):
5255
```
5356
bash scripts/env_cuda.sh 11.8
5457
```
55-
Then, run:, please run:
58+
Then, please run:
5659
```
5760
bash scripts/install.sh
5861
```
@@ -69,6 +72,16 @@ path/to/weights/jde/jde.1088x608.uncertainty.pt
6972
The file can be downloaded at the following link (in place of the above file path):
7073
"https://docs.google.com/uc?export=download&id=1nlnuYfGNuHWZztQHXwVZSL_FvfE551pA"
7174

75+
### 2. Using uv:
76+
Within the root folder of compressai-vision:
77+
```
78+
uv run -- scripts/install_uv.sh
79+
```
80+
81+
Note: Make sure you pin the desired installed python version before, e.g.,
82+
```
83+
uv python pin 3.8
84+
```
7285

7386
## Usage
7487

0 commit comments

Comments
 (0)