Skip to content

Commit

Permalink
📝 improve installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry committed Mar 5, 2024
1 parent 2476a58 commit 92b7fa7
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ papermill 01_0_split_data.ipynb --help-notebook
papermill 01_1_train_vae.ipynb --help-notebook
```

> Misstyped argument names won't throw an error when using papermill
> Mistyped argument names won't throw an error when using papermill



## Setup for PIMMS comparison workflow

The package is available as a standalone software on pypi. However, running the entire snakemake workflow in enabled using
conda (or mamba) and pip to setup the environment. For a detailed description of setting up
The core funtionality is available as a standalone software on PyPI under the name `pimms-learn`. However, running the entire snakemake workflow in enabled using
conda (or mamba) and pip to setup an analysis environment. For a detailed description of setting up
conda (or mamba), see [instructions on setting up a virtual environment](https://github.com/RasmussenLab/pimms/blob/HEAD/docs/venv_setup.md).

Download the repository
Expand All @@ -70,24 +70,27 @@ conda env create -n pimms -f environment.yml # slower
mamba env create -n pimms -f environment.yml # faster, less then 5mins
```

If on Mac M1, M2 or having otherwise issue using your accelerator (e.g. GPUs): Install the pytorch dependencies first, then the rest of the environment.
If on Mac M1, M2 or having otherwise issue using your accelerator (e.g. GPUs): Install the pytorch dependencies first, then the rest of the environment:

### Install development dependencies

Check how to install pytorch for your system [here](https://pytorch.org/get-started/previous-versions/#v1131).
Check how to install pytorch for your system [here](https://pytorch.org/get-started).

- select the version compatible with your cuda version if you have an nvidia gpu
- select the version compatible with your cuda version if you have an nvidia gpu or a Mac M-chip.

```bash
conda create -n vaep_manuel python=3.8 pip
conda activate vaep_manuel
conda update pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia # might be different
pip install . # pimms-learn
pip install papermill jupyterlab # use run notebook interactive or as a script
conda create -n vaep python=3.8 pip
conda activate vaep
# Follow instructions on https://pytorch.org/get-started
# conda env update -f environment.yml -n vaep # should not install the rest.
pip install pimms-learn
pip install jupyterlab papermill # use run notebook interactively or as a script

cd project
# choose one of the following to test the code
jupyter lab # open 04_1_train_pimms_models.ipynb
papermill 04_1_train_pimms_models.ipynb 04_1_train_pimms_models_test.ipynb # second notebook is output
python 04_1_train_pimms_models.ipynb # just execute the code
# jupyter lab # open 04_1_train_pimms_models.ipynb
python 04_1_train_pimms_models.py # just execute the code
```

### Entire development installation
Expand Down Expand Up @@ -120,8 +123,9 @@ Trouble shoot your R installation by opening jupyter lab
```
# in projects folder
jupyter lab # open 01_1_train_NAGuideR.ipynb
```

## Run Demo
## Run an analysis

Change to the [`project` folder](./project) and see it's [README](project/README.md)

Expand Down

0 comments on commit 92b7fa7

Please sign in to comment.