From bf3e206bd96ae73513d289e4c47bfd385d4463b5 Mon Sep 17 00:00:00 2001 From: Abraham Levitan Date: Fri, 28 Jun 2019 23:48:39 -0400 Subject: [PATCH] Update the setup file and readme to have sane installation instructions --- README.md | 31 ++++++++++++++++++++++++++++++- setup.py | 2 +- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 843ccf7..e174b14 100644 --- a/README.md +++ b/README.md @@ -8,4 +8,33 @@ Note about authors and availability Example usage -Available methods \ No newline at end of file +Available methods + + +## Installation + +Installation can be done via pip. The only hiccup is that pytorch needs to be compiled with either MKL support (if you intend to do processing on the CPU), or with CUDA support (if you intend to do GPU processing). + +For this reason, we recommend using Anaconda python as it handles both cases fairly seamlessly. When using Anaconda python, it is still important to manually install pytorch before installing CDTools, because the pip installer will find and install the wrong version of pytorch (which is listed on pypi). + +Therefore, a simple install process can proceed as follows. First, clone the Git repository and navigate to the top-level folder. Then, run: + +```console +$ conda install Pytorch -c Pytorch +$ pip install -e . +``` + +We recommend installing the package in developer mode as above, because the package is under active development. We also suggest installing it into it's own virtual environment as general good practice. Finally, if you would like to integrate it into a larger environment, it is a good idea to install the dependencies via conda before installing the package itself via pip. + +If you manage your python installation a different way, the various dependencies that need to be installed are listed in the setup.py file. + + +## Running the tests + +It is a good idea to run the tests after installation to ensure that everything is working, and from time to time as things change on your computer. You can run the tests by installing pytorch, and then running + +```console +$ pytest +``` + +In the top-level directory \ No newline at end of file diff --git a/setup.py b/setup.py index 5f37bab..4d70f23 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ setuptools.setup( "scipy", "matplotlib", "python-dateutil", - #"pytorch", + "torch", "h5py"], packages=setuptools.find_packages(), classifiers=[