Skip to content

Commit f2c596c

Browse files
authored
Inline dependencies into pyproject.toml (#46)
1 parent eb161fc commit f2c596c

File tree

5 files changed

+76
-34
lines changed

5 files changed

+76
-34
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: GenJAX Access
3+
about: request access to GenJAX
4+
title: "[GENJAX]"
5+
labels: genjax
6+
assignees: sritchie
7+
8+
---
9+
10+
**Say hi!**
11+
12+
Who are you, and why do you need access to GenJAX?
13+
14+
**Google Account**
15+
16+
Share an email address associated with a google account.

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,53 @@
1414

1515
# Installation Guide
1616

17-
Setup Python environment:
18-
```
19-
git clone https://github.com/probcomp/bayes3d.git
20-
cd bayes3d
17+
Set up a fresh Python environment:
18+
19+
```bash
2120
conda create -n bayes3d python=3.9
2221
conda activate bayes3d
23-
pip install -r requirements.txt
24-
pip install -e .
2522
```
2623

27-
Install GenJAX (optional):
28-
```
29-
pip install git+https://github.com/probcomp/[email protected]
24+
Install compatible versions JAX and Torch:
25+
26+
```bash
27+
pip install --upgrade torch==2.2.0 torchvision==0.17.0+cu118 --index-url https://download.pytorch.org/whl/cu118
28+
pip install --upgrade jax[cuda11_local]==0.4.20 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
3029
```
3130

32-
Install JAX and Torch:
31+
Bayes3D is built on top of GenJAX, which is currently hosted in a private Python
32+
package repository. To configure your machine to access GenJAX:
33+
34+
- [File an issue](https://github.com/probcomp/bayes3d/issues/new) asking @sritchie to give you access.
35+
- [Install the Google Cloud command line tools](https://cloud.google.com/sdk/docs/install).
36+
- Follow the instructions on the [installation page](https://cloud.google.com/sdk/docs/install)
37+
- run `gcloud init` as described [in this
38+
guide](https://cloud.google.com/sdk/docs/initializing) and configure the tool
39+
with the `probcomp-caliban` project ID.
40+
41+
Then run the following command to configure `pip` to use these new gcloud
42+
commands:
43+
44+
```bash
45+
pip install keyring keyrings.google-artifactregistry-auth
3346
```
34-
pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
35-
pip install torch torchvision --upgrade --index-url https://download.pytorch.org/whl/cu118
47+
48+
Finally, install Bayes3D:
49+
50+
```bash
51+
pip install --extra-index-url https://us-west1-python.pkg.dev/probcomp-caliban/probcomp/simple/ \
52+
git+https://github.com/probcomp/bayes3d.git#egg=bayes3d
3653
```
3754

3855
Download model and data assets:
39-
```
40-
bash download.sh
41-
```
4256

57+
```bash
58+
wget -q -O - https://raw.githubusercontent.com/probcomp/bayes3d/main/download.sh | bash
59+
```
4360

4461
## Test
45-
Run `python demo.py` to test installation setup.
4662

63+
Run `python demo.py` to test installation setup.
4764

4865
## Common issues
4966

@@ -86,16 +103,17 @@ sudo apt-get update
86103
sudo apt-get install ninja-build
87104
```
88105

89-
I did somethi!
90-
91106
To check your CUDA version:
92107
```
93108
nvcc --version
94109
```
95110

96111

97112
# GCP Setup
98-
- Start new VM instance (see [link](https://cloud.google.com/compute/docs/instances/create-start-instance)). Select GPU - NVIDIA V100 and Machine Type 8vCPU 4 Core 30GB.
113+
114+
- Start new VM instance (see
115+
[link](https://cloud.google.com/compute/docs/instances/create-start-instance)).
116+
Select GPU - NVIDIA V100 and Machine Type 8vCPU 4 Core 30GB.
99117

100118
-From the VM instances page, searched for public image `c2-deeplearning-pytorch-2-0-gpu-v20230925-debian-11-py310`. Increase storage to 1000GB.
101119

bayes3d/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
.. include:: ./documentation.md
33
"""
44

5+
from importlib import metadata
6+
57
from . import colmap, distributions, scene_graph, utils
68
from .camera import *
79
from .likelihood import *
@@ -12,4 +14,6 @@
1214

1315
RENDERER = None
1416

17+
__version__ = metadata.version("bayes3d")
18+
1519
__all__ = ["colmap", "distributions", "scene_graph", "utils"]

pyproject.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,25 @@ classifiers = [
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12"
2626
]
27-
dynamic = ["version", "dependencies", "optional-dependencies"]
27+
dependencies = [
28+
"distinctipy",
29+
"genjax==0.1.1",
30+
"graphviz",
31+
"imageio",
32+
"matplotlib",
33+
"meshcat",
34+
"natsort",
35+
"numpy",
36+
"open3d",
37+
"opencv-python",
38+
"plyfile",
39+
"pyliblzfse",
40+
"pyransac3d",
41+
"tensorflow-probability",
42+
"timm",
43+
"trimesh",
44+
]
45+
dynamic = ["version", "optional-dependencies"]
2846

2947

3048
[tool.ruff]
@@ -81,5 +99,4 @@ include = ["bayes3d"]
8199
namespaces = false
82100

83101
[tool.setuptools.dynamic]
84-
dependencies = {file = ["requirements.txt"]}
85102
optional-dependencies = {dev = { file = ["requirements-dev.txt"] }}

requirements.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)