Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@ Rubix is on [PyPi](https://pypi.org/project/astro-rubix/). You can install it vi
pip install astro-rubix
```

If you need GPU acceleration, you can install it via

```
pip install astro-rubix[cuda]
```

Alternatively, the Python package `rubix` is published on GitHub and can be installed alongside its runtime dependencies (including JAX) by choosing the relevant extras. For a CPU-only environment, install with:

```
git clone https://github.com/AstroAI-Lab/rubix.git
cd rubix
pip install .[cpu]
pip install .
```

If you need GPU acceleration, replace `[cpu]` with `[cuda]` (or install `jax[cuda]` following the [JAX instructions](https://github.com/google/jax#installation) before installing Rubix). The plain `pip install .` command installs the minimal package without JAX and will raise `ImportError` if you try to import `rubix` before adding `jax` manually.
If you need GPU acceleration, please add the optional dependence with `[cuda]` (or install `jax[cuda]` following the [JAX instructions](https://github.com/google/jax#installation) before installing Rubix).

## Development installation

Expand All @@ -49,7 +55,7 @@ the following editable installation from this repository:
```
git clone https://github.com/AstroAI-Lab/rubix.git
cd rubix
python -m pip install --editable .[cpu,tests,dev]
python -m pip install --editable .[tests,dev]
```

Having done so, the test suite can be run using `pytest`:
Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ You can then clone the repo and install it in editable mode with the extra devel
```bash
git clone https://github.com/AstroAI-Lab/rubix
cd rubix
pip install -e .[cpu,dev]
pip install -e .[dev]
```

Note: if you are planning to use RUBIX on the GPU you need to replace the `cpu` dependency with the corresponding `cuda` dependency. If you additionally plan to build the docs locally you'll also need to include the `docs` dependency group.
Note: if you are planning to use RUBIX on the GPU you need to add the corresponding optional `cuda` dependency. If you additionally plan to build the docs locally you'll also need to include the `docs` dependency group.

### Setting up pre-commit hooks

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ keywords =[
urls = { Homepage = "https://astro-rubix.web.app", Repository = "https://github.com/AstroAI-Lab/rubix", Issues = "https://github.com/AstroAI-Lab/rubix/issues" }

dependencies = [
"jax[cpu]>0.5.1",
"requests",
"h5py",
"astropy",
Expand Down Expand Up @@ -102,9 +103,7 @@ docs = [
"sphinx_mdinclude",
"sphinx_rtd_theme",
]
cpu = [
"jax[cpu]>0.5.1",
]

cuda = [
"jax[cuda]>0.5.1",
]
Expand Down