Add pyproject.toml to allow easy installion

Add a proper pyproject.toml to allow easy installion
This commit is contained in:
Jianyuan Wang
2025-03-23 19:51:17 +00:00
committed by GitHub
6 changed files with 71 additions and 19 deletions
+2
View File
@@ -0,0 +1,2 @@
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
+4
View File
@@ -144,3 +144,7 @@ dmypy.json
**/tmp/
**/outputs/skyseg.onnx
skyseg.onnx
# pixi environments
.pixi
*.egg-info
+16 -1
View File
@@ -35,9 +35,24 @@ First, clone this repository to your local machine, and install the dependencies
```bash
git clone git@github.com:facebookresearch/vggt.git
cd vggt
pip install -r requirements.txt
```
### Install with pip
```bash
pip install -e .
```
### Install and run with pixi
Download [pixi here](https://pixi.sh)
```bash
pixi run -e python demo_gradio.py
```
### Install and run with uv
Download [uv here](https://docs.astral.sh/uv/getting-started/installation/)
```bash
uv run --extra demo demo_gradio.py
```
Now, try the model with just a few lines of code:
+49
View File
@@ -0,0 +1,49 @@
[project]
authors = [{ name = "Jianyuan Wang", email = "jianyuan@robots.ox.ac.uk" }]
dependencies = [
"torch>=2.3.1",
"torchvision>=0.18.1",
"numpy<2",
"Pillow",
"huggingface_hub",
"einops",
"safetensors",
]
name = "vggt"
requires-python = ">= 3.11"
version = "0.1.0"
[project.optional-dependencies]
demo = [
"gradio==5.17.1",
"viser==0.2.23",
"tqdm",
"hydra-core",
"omegaconf",
"opencv-python",
"scipy",
"onnxruntime",
"requests",
"trimesh",
"matplotlib",
]
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[tool.hatch.build.targets.wheel]
packages = ["vggt"]
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.pypi-dependencies]
vggt = { path = ".", editable = true }
[tool.pixi.environments]
default = { solve-group = "default" }
demo = { features = ["demo"], solve-group = "default" }
[tool.pixi.tasks]
-7
View File
@@ -1,7 +0,0 @@
torch==2.3.1
torchvision==0.18.1
numpy==1.26.1
Pillow
huggingface_hub
einops
safetensors
-11
View File
@@ -1,11 +0,0 @@
gradio==5.17.1
viser==0.2.23
tqdm
hydra-core
omegaconf
opencv-python
scipy
onnxruntime
requests
trimesh
matplotlib