Skip to content

Commit

Permalink
Add instructions of installing dependencies using pip
Browse files Browse the repository at this point in the history
* Enable to support Windows and venv.
* Simplify the installation.
  • Loading branch information
gongminmin committed Jan 22, 2025
1 parent eeacb0b commit a25f3c0
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
```

2. Install the dependencies:


There are two ways of installing dependencies.

1. Using a script (Linux & Conda only)

**Before running the following command there are somethings to note:**
- By adding `--new-env`, a new conda environment named `trellis` will be created. If you want to use an existing conda environment, please remove this flag.
- By default the `trellis` environment will use pytorch 2.4.0 with CUDA 11.8. If you want to use a different version of CUDA (e.g., if you have CUDA Toolkit 12.2 installed and do not want to install another 11.8 version for submodule compilation), you can remove the `--new-env` flag and manually install the required dependencies. Refer to [PyTorch](https://pytorch.org/get-started/previous-versions/) for the installation command.
Expand Down Expand Up @@ -83,6 +87,40 @@
--demo Install all dependencies for demo
```

2. Using pip (Windows & venv):

**Note:** Preinstall Python 3.10 and CUDA SDK 12.4. These versions are crucial. Other combinations may cause issues and will be discussed later.

Steps:

- **Create a virtual environment in the `Venv` directory:**
```cmd
python -m v Venv
```

- **Activate the virtual environment:**

```cmd
Venv\Scripts\activate
```

- **Install package using pip:** This may take a while.
```cmd
pip install -r requirements.txt
```

- **Install extra packages with dependencies on PyTorch:**
```cmd
pip install -r requirements_extra.txt
```

**Known Issues**

1. For Python 3.11, there are issues when installing `diffoctreerast` and `diff-gaussian-rasterization`. The error reported is that the module `torch` couldn't be found.
2. The package `spconv` does not support Python 3.12 (yet).
Additional work may be necessary to resolve these issues.
<!-- Pretrained Models -->
## 🤖 Pretrained Models
Expand Down
35 changes: 35 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--extra-index-url https://download.pytorch.org/whl/cu124
torch==2.5.1+cu124
torchvision==0.20.1+cu124
xformers==0.0.28.post3

pillow==10.2.0
imageio==2.37.0
imageio-ffmpeg==0.6.0
tqdm==4.67.1
easydict==1.13
opencv-python-headless==4.11.0.86
scipy==1.15.1
ninja==1.11.1.3
rembg==2.0.61
onnxruntime==1.20.1
trimesh==4.6.0
xatlas==0.0.9
pyvista==0.44.2
pymeshfix==0.17.0
igraph==0.11.8
transformers==4.48.1

git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8

https://github.com/bdashore3/flash-attention/releases/download/v2.7.1.post1/flash_attn-2.7.1.post1+cu124torch2.5.1cxx11abiFALSE-cp310-cp310-win_amd64.whl

--find-links https://nvidia-kaolin.s3.us-east-2.amazonaws.com/torch-2.5.1_cu124.html
kaolin

git+https://github.com/NVlabs/nvdiffrast.git

spconv-cu120==2.3.6

gradio==4.44.1
gradio_litmodel3d==0.0.1
2 changes: 2 additions & 0 deletions requirements_extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
git+https://github.com/JeffreyXiang/diffoctreerast.git
git+https://github.com/autonomousvision/mip-splatting.git#subdirectory=submodules/diff-gaussian-rasterization/

0 comments on commit a25f3c0

Please sign in to comment.