Skip to content

Commit 70b9243

Browse files
authored
Merge pull request #188 from AstroAI-Lab/pyproject-fix
Pyproject fix
2 parents 79a0690 + 3a0c7e7 commit 70b9243

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,21 @@ Rubix is on [PyPi](https://pypi.org/project/astro-rubix/). You can install it vi
3131
pip install astro-rubix
3232
```
3333

34+
If you need GPU acceleration, you can install it via
35+
36+
```
37+
pip install astro-rubix[cuda]
38+
```
39+
3440
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:
3541

3642
```
3743
git clone https://github.com/AstroAI-Lab/rubix.git
3844
cd rubix
39-
pip install .[cpu]
45+
pip install .
4046
```
4147

42-
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.
48+
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).
4349

4450
## Development installation
4551

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

5561
Having done so, the test suite can be run using `pytest`:

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ You can then clone the repo and install it in editable mode with the extra devel
3030
```bash
3131
git clone https://github.com/AstroAI-Lab/rubix
3232
cd rubix
33-
pip install -e .[cpu,dev]
33+
pip install -e .[dev]
3434
```
3535

36-
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.
36+
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.
3737

3838
### Setting up pre-commit hooks
3939

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ keywords =[
5959
urls = { Homepage = "https://astro-rubix.web.app", Repository = "https://github.com/AstroAI-Lab/rubix", Issues = "https://github.com/AstroAI-Lab/rubix/issues" }
6060

6161
dependencies = [
62+
"jax[cpu]>0.5.1",
6263
"requests",
6364
"h5py",
6465
"astropy",
@@ -102,9 +103,7 @@ docs = [
102103
"sphinx_mdinclude",
103104
"sphinx_rtd_theme",
104105
]
105-
cpu = [
106-
"jax[cpu]>0.5.1",
107-
]
106+
108107
cuda = [
109108
"jax[cuda]>0.5.1",
110109
]

0 commit comments

Comments
 (0)