File size: 3,643 Bytes
30bcbfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103ef6d
30bcbfd
 
 
 
 
103ef6d
 
 
30bcbfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103ef6d
30bcbfd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "mini-dust3r"
version = "0.1.3"
description = "Miniature version of dust3r, focused on inference"
requires-python = ">=3.10.0"
license = { file = "LICENSE" }
classifiers = [
    "Development Status :: 3 - Alpha",
    "Programming Language :: Python",
]
readme = "README.md"


dependencies = [
    "torch>=2.3.1",
    "torchvision>=0.18.1",
    "opencv-python>=4.10.0",
    "rerun-sdk>=0.17.0",
    "tqdm>=4.66.5",
    "trimesh>=4.4.4",
    "jaxtyping>=0.2.33",
    "beartype>=0.18.5",
    "einops>=0.8.0",
    "gradio>=4.41.0,<5",
    "scipy>=1.14.0",
    # # not in conda dependencies
    "roma>=1.5",
    "safetensors>=0.4.3",
    "hf-transfer>=0.1.6",
    "gradio-rerun>=0.0.8",
    "pillow-heif>=0.20.0,<0.21",
    "build>=1.2.2.post1,<2",
]

[tool.setuptools.packages.find]
include = ["mini_dust3r*"]

[tool.pixi.project]
name = "mini-dust3r"
authors = ["pablovela5620 <[email protected]>"]
channels = ["nvidia", "nvidia/label/cuda-12.1.0", "conda-forge", "pytorch"]
platforms = ["linux-64", "osx-arm64", "win-64"]

[tool.pixi.system-requirements]
libc = { family = "glibc", version = "2.31" }

[tool.pixi.activation]
scripts = [".pixi.sh"]

[tool.pixi.tasks]
_build-croco = { cmd = "python setup.py build_ext --inplace", cwd = "mini_dust3r/croco/curope/", outputs = [
    "lib.linux-x86_64-cpython-311/curope.cpython-311-x86_64-linux-gnu.so",
] }
_download-checkpoint = { cmd = "ls checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth || wget -P checkpoints/ https://download.europe.naverlabs.com/ComputerVision/DUSt3R/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth", outputs = [
    "checkpoints/DUSt3R_ViTLarge_BaseDecoder_512_dpt.pth",
] }
_post-install = { cmd = "pwd", depends_on = [
    "download-checkpoint",
    "build-croco",
] }
_dev-install = "python -m pip install build twine"
_build-wheel = "python -m build"
upload-hf = { cmd = "python tools/upload_to_hf.py", depends_on = [
    "_build-wheel",
] }


[tool.pixi.tasks.build-wheel]
cmd = "python -m build"
depends_on = ["_dev-install"]
description = "Build python wheels"

[tool.pixi.tasks.rerun-demo]
cmd = "PYTORCH_ENABLE_MPS_FALLBACK=1 python tools/rerun_demo.py"
description = "runs demo using rerun visualizer"

[tool.pixi.tasks.app]
cmd = "python tools/gradio_app.py"
description = "run gradio frontend for mini-dust3r"

[tool.pixi.tasks.dev-app]
cmd = """
    gradio tools/gradio_app.py
    """
description = "Runs Gradio frontend with hot-reload"

[tool.pixi.feature.spaces.tasks.app]
cmd = """
    python gradio_app.py
    """
description = "Runs Gradio frontend in huggingface spaces"

[tool.pixi.dependencies]
python = "3.11.*"
pytorch = { version = "2.3.1", channel = "pytorch" }
torchvision = { version = "0.18.1", channel = "pytorch" }
py-opencv = ">=4.10.0,<5"
tqdm = ">=4.66.5,<5"
trimesh = ">=4.4.4,<5"
jaxtyping = ">=0.2.33,<0.3"
beartype = ">=0.18.5,<0.19"
einops = ">=0.8.0,<0.9"
gradio = ">=4.41.0,<5"
scipy = ">=1.14.0,<2"
pip = ">=24.2,<25"
rerun-sdk = ">=0.19.0,<0.20"

[tool.pixi.pypi-dependencies]
# mini-dust3r = { path = ".", editable = true }
mini-dust3r = { path = "dist/mini_dust3r-0.1.3-py3-none-any.whl" }

[tool.pixi.target.linux-64.dependencies]
cuda = { version = "12.1", channel = "nvidia/label/cuda-12.1.0" }
pytorch-cuda = { version = "12.1.*", channel = "pytorch" }

[tool.pixi.feature.spaces.pypi-dependencies]
spaces = "*"

[tool.pixi.environments]
spaces = { features = ["spaces"], solve-group = "default" }

[tool.ruff]
ignore = [
    "F722", # Forward annotation false positive from jaxtyping. Should be caught by pyright.
]