Skip to content

Commit

Permalink
Inline dependencies into pyproject.toml (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
sritchie authored Jan 30, 2024
1 parent eb161fc commit f2c596c
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 34 deletions.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/genjax_access.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: GenJAX Access
about: request access to GenJAX
title: "[GENJAX]"
labels: genjax
assignees: sritchie

---

**Say hi!**

Who are you, and why do you need access to GenJAX?

**Google Account**

Share an email address associated with a google account.
56 changes: 37 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,53 @@

# Installation Guide

Setup Python environment:
```
git clone https://github.com/probcomp/bayes3d.git
cd bayes3d
Set up a fresh Python environment:

```bash
conda create -n bayes3d python=3.9
conda activate bayes3d
pip install -r requirements.txt
pip install -e .
```

Install GenJAX (optional):
```
pip install git+https://github.com/probcomp/[email protected]
Install compatible versions JAX and Torch:

```bash
pip install --upgrade torch==2.2.0 torchvision==0.17.0+cu118 --index-url https://download.pytorch.org/whl/cu118
pip install --upgrade jax[cuda11_local]==0.4.20 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
```

Install JAX and Torch:
Bayes3D is built on top of GenJAX, which is currently hosted in a private Python
package repository. To configure your machine to access GenJAX:

- [File an issue](https://github.com/probcomp/bayes3d/issues/new) asking @sritchie to give you access.
- [Install the Google Cloud command line tools](https://cloud.google.com/sdk/docs/install).
- Follow the instructions on the [installation page](https://cloud.google.com/sdk/docs/install)
- run `gcloud init` as described [in this
guide](https://cloud.google.com/sdk/docs/initializing) and configure the tool
with the `probcomp-caliban` project ID.

Then run the following command to configure `pip` to use these new gcloud
commands:

```bash
pip install keyring keyrings.google-artifactregistry-auth
```
pip install --upgrade "jax[cuda11_pip]" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install torch torchvision --upgrade --index-url https://download.pytorch.org/whl/cu118

Finally, install Bayes3D:

```bash
pip install --extra-index-url https://us-west1-python.pkg.dev/probcomp-caliban/probcomp/simple/ \
git+https://github.com/probcomp/bayes3d.git#egg=bayes3d
```

Download model and data assets:
```
bash download.sh
```

```bash
wget -q -O - https://raw.githubusercontent.com/probcomp/bayes3d/main/download.sh | bash
```

## Test
Run `python demo.py` to test installation setup.

Run `python demo.py` to test installation setup.

## Common issues

Expand Down Expand Up @@ -86,16 +103,17 @@ sudo apt-get update
sudo apt-get install ninja-build
```

I did somethi!

To check your CUDA version:
```
nvcc --version
```


# GCP Setup
- 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.

- 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.

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

Expand Down
4 changes: 4 additions & 0 deletions bayes3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.. include:: ./documentation.md
"""

from importlib import metadata

from . import colmap, distributions, scene_graph, utils
from .camera import *
from .likelihood import *
Expand All @@ -12,4 +14,6 @@

RENDERER = None

__version__ = metadata.version("bayes3d")

__all__ = ["colmap", "distributions", "scene_graph", "utils"]
21 changes: 19 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,25 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12"
]
dynamic = ["version", "dependencies", "optional-dependencies"]
dependencies = [
"distinctipy",
"genjax==0.1.1",
"graphviz",
"imageio",
"matplotlib",
"meshcat",
"natsort",
"numpy",
"open3d",
"opencv-python",
"plyfile",
"pyliblzfse",
"pyransac3d",
"tensorflow-probability",
"timm",
"trimesh",
]
dynamic = ["version", "optional-dependencies"]


[tool.ruff]
Expand Down Expand Up @@ -81,5 +99,4 @@ include = ["bayes3d"]
namespaces = false

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
optional-dependencies = {dev = { file = ["requirements-dev.txt"] }}
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

0 comments on commit f2c596c

Please sign in to comment.