Skip to content

Commit

Permalink
expand install options
Browse files Browse the repository at this point in the history
Signed-off-by: Erin Grant <eringrant@users.noreply.github.com>
  • Loading branch information
eringrant committed Sep 17, 2023
1 parent 91e1889 commit 26dbd3c
Showing 1 changed file with 63 additions and 5 deletions.
68 changes: 63 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,80 @@

Equinox (JAX) neural nets.

## Quickstart

Clone the repo:

```sh
git clone git@github.com:eringrant/nets.git
cd nets/
```

To install a Conda environment with the requisite packages on CPU:

```sh
conda env create --file environment-cpu.yml
```

To test the code by running a quick visualization:

```sh
TODO
```

## Installation

### Command-line
### Method #1: via Conda

Use Conda to develop `nets` code directly.

#### Option #1.1: CPU-only

To install via [Mamba](https://mamba.readthedocs.io/) (recommended)
or [Conda](https://docs.conda.io/), do:

```sh
conda env create --file environment-cpu.yml
```

#### Option #1.2: On GPU on a local machine

To install via [Mamba](https://mamba.readthedocs.io/) (recommended)
or [Conda](https://docs.conda.io/) with GPU support, do:

```sh
conda env create --file environment-gpu.yml
```

#### Option #1.3: On GPU on a SLURM cluster

If working on the head node of a SLURM cluster, you will need
to create a GPU-compatible environment on a compute node with an available GPU via:

```sh
srun --partition=gpu --gres=gpu:1 conda env create -f environment-gpu.yml
```

Note that you may have to adapt the `partition` name to the available partitions on your cluster;
run `sinfo -s` to display details about partitions.

### Method #2: via Pip

Use Pip in order to install this code as a package in another project.

#### Option #2.1: Command-line

```bash
python -m pip install git+https://github.com/eringrant/nets
```

### In a requirements file
#### Option #2.2: In a requirements file

```
nets @ git+https://github.com/eringrant/nets
```

### Locally & as an editable package
#### Option #2.3: Locally & as an editable package

```bash
git clone git@github.com:eringrant/nets.git
Expand All @@ -28,8 +87,7 @@ python -m pip install -e .

### Pre-commit

[`.pre-commit-config.yaml`](/.pre-commit-config.yaml) has been configured to run several autoformatters,
including the [Black](https://black.readthedocs.io/) autoformatter as well as [Flake8](https://flake8.pycqa.org/).
[`.pre-commit-config.yaml`](/.pre-commit-config.yaml) has been configured to run several autoformatters.
Run the following to install, update, and cache all pre-commit tools:

```bash
Expand Down

0 comments on commit 26dbd3c

Please sign in to comment.