Skip to content

Installation Local

catubc edited this page Oct 9, 2020 · 27 revisions

YASS - Installation Instructions For Linux (Ubuntu 18.04)

[UPDATE - Oct 2020] If you are having trouble installing yass with the instructions below (due to constant updates of NVIDIA and CUDA drivers and pytorch compatibility issues) you may wish to follow these driver instructions to install NVIDIA + cuda 10-1:

https://medium.com/@exesse/cuda-10-1-installation-on-ubuntu-18-04-lts-d04f89287130

And then install pytorch from the yass conda environment (it installed pytorch 1.4 in our case).

conda install pytorch

Preliminary Notes

YASS installation has been tested on workstations running Ubuntu 16.04 or 18.04 with at least one NVIDIA GPU and >16GB of RAM. Windows and Mac installations should be possible using similar instructions, please contact us if you run into installation issues on those systems.

Installing NVIDIA driver and Toolkit:

YASS was tested with NVIDIA 410+ drivers and Toolkit 10.0+, but should work with other versions. If you do not have experience installing installed NVIDIA video drivers, we recommend seeking assistance from IT support as upgrading video drivers may corrupt your Ubuntu installation.

  1. Install NVIDIA 410+ from NVIDIA: https://www.nvidia.com/Download/index.aspx

  2. Install Toolkit: https://developer.nvidia.com/cuda-downloads

  3. [Optional]: some toolkit installations require additional referencing to the cuda-toolkit. These lines can be run at the command line with CUDA_TOOLKIT_NAME replaced by your cuda toolkit version or added to your ./bashrc file:

    export PATH=/usr/local/CUDA_TOOLKIT_NAME/bin:${PATH}

    export LD_LIBRARY_PATH=/usr/local/CUDA_TOOLKIT_NAME/lib64:$LD_LIBRARY_PATH

    export CUDA_HOME=/usr/local/CUDA_TOOLKIT_NAME

    Or adding them to your ~.bashrc file.

Please note that some installations issues can arise as NVIDIA 410 drivers appear to only work with pytorch 1.3.1 and NVIDIA 440+ with pytorch 1.4.0.

Installing Anaconda and creating YASS environment:

  1. [Optional] Download anaconda environment manager (recommended): https://www.anaconda.com/distribution/

  2. [Optional] Create a conda environment to run yass using python 3.7 (recommended):

    conda create -n yass python=3.7

  3. [Optional] Activate conda environment (recommended):

    source activate yass

Cloning and installing YASS python and cuda code:

  1. Clone YASS repository:

    git clone https://github.com/paninski-lab/yass

  2. Install YASS dependencies:

    cd yass

    pip --no-cache-dir install -e .

  3. Install pytorch master branch from conda (we recommend installing pytorch 1.2):

    conda install pytorch==1.2

  4. Compile cuda code using default gcc [Note updated CUDA code in Mar/2020]:

    cd src/gpu_bspline_interp

    python setup.py install --force

    cd ..

    cd gpu_rowshift

    python setup.py install --force

Some installation issues may arise if different gcc versions were used for pytorch installation and for cuda code.

Running Default Test

Yass comes with a test dataset (60 second; 10 channels) for testing the install. To run this test:

  1. Change directory to main directory of dataset:

    cd samples/10chan

  2. Run test using default configuration:

    yass sort config.yaml

If yass runs successfully, several files will be generated in your root directory.

├── data.bin
├── config.yaml
├── geom.txt
├── tmp
│   ├── block_1
│   ├── block_2
│   ├── final_deconv
│   ├── ...
│   ├── spike_train.npy
│   └── yass.log

The spike_train.npy file is a 2-column python numpy array containing spiketimes (first column) and cluster/neuron ids (second column).

Clone this wiki locally