Installation Guide#

System Requirements#

CEBRA is written in Python (3.9+) and PyTorch. CEBRA is most effective when used with a GPU, but CPU-only support is provided. We provide instructions to run CEBRA on your system directly. The instructions below were tested on different compute setups with Ubuntu 18.04 or 20.04, using Nvidia GTX 2080, A4000, and V100 cards. Other setups are possible (including Windows), as long as CUDA 10.2+ support is guaranteed.

  • Software dependencies and operating systems:
    • Linux or MacOS

  • Versions software has been tested on:
    • Linux (Ubuntu 20.04, 18.04, MacOS 12.1-5)

  • Required non-standard hardware
    • GPU (optional)

Installation Guide#

We outline installation instructions for different systems. CEBRA will be installed via pip install cebra.

CEBRA’s dependencies can be installed using pip or conda and we outline different options below.

CEBRA can also be installed and run on Google Colaboratory. Please see the open in colab button at the top of each demo notebook for examples.

If you are starting with a new notebook, simply run

! pip install cebra

In the first cell.

Installation Troubleshooting#

If yopu have issues installing CEBRA, we recommend carefully checking the traceback which can help you look on stackoverflow or the popular-in-life-sciences, Image Forum for similar issues. If you cannot find a solution, please do post an issue on GitHub!

Advanced Installation for Schneider, Lee, Mathis 2023 paper experiments#

If you want to install the additional dependencies required to run comparisons with other algorithms, please see the following:

We provide a conda environment with the full requirements needed to reproduce the first CEBRA paper (although we recommend using Docker). Namely, you can run CEBRA, piVAE, tSNE and UMAP within this conda env. It is NOT needed if you only want to use CEBRA.

  • For all platforms except MacOS with M1/2 chipsets, create the full environment using cebra_paper.yml, by running the following from the CEBRA repo root directory:

    $ conda env create -f conda/cebra_paper.yml
    
  • If you are a MacOS M1 or M2 user and want to reproduce the paper, use the cebra_paper_m1.yml instead. You’ll need to install tensorflow. For that, use miniconda3 and follow the setup instructions for tensorflow listed in the Apple developer docs. In the Terminal, run the following commands:

    wget https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-MacOSX-arm64.sh -O ~/miniconda.sh
    bash ~/miniconda.sh -b -p $HOME/miniconda
    source ~/miniconda/bin/activate
    conda init zsh
    

    Then, you can build the full environment from the root directory:

    $ conda env create -f conda/cebra_paper_m1.yml