Skip to content

Local Machine Installation

Alana Darcher edited this page Feb 14, 2024 · 4 revisions

Requirements:

  • OS: Linux or Mac/OSx
  • Python 3.5 or higher (either system-level, or in an IDE)
  • 400 MB free disk space
  • Permission to perform sudo-level commands

Installation:

Installing epiphyte involves three broad steps: 1) installing and setting up a DataJoint docker container on the system-level, 2) download and launch the DataJoint MySQL server via docker-compose, and 3), installing the code package either on the system-level, or within a virtual environment (recommended). More information about the packages and software used by epiphyte can be found in the wiki.

1. Install and set-up the DataJoint docker container.

  • Install the correct Docker for your OS.
  • Verify the Docker installation:
docker --version
docker run hello-world
docker-compose --version

2. Download and launch the DataJoint MySQL server via docker-compose.

(Following is taken from DataJoint documentation.)

  • Create a directory to store the docker-compose YAML file:
mkdir mysql-docker
cd mysql-docker
wget https://raw.githubusercontent.com/datajoint/mysql-docker/master/docker-compose.yaml
docker-compose up -d
  • Download a package that enables access to your locally running MySQL server:

Linux:

sudo apt-get install mysql-client

Mac (via Homebrew):

brew install mysql@5.7
brew tap homebrew/services
brew services start mysql@5.7
brew services list
brew link --force mysql@5.7
mysql -V # verify the installation
  • Test the server access. If there are issues, refer here.
mysql -h 127.0.0.1 -u root -p
Enter password: [type in your password here: default is "simple"]

3. Install Epiphyte:

There are two ways to install epiphyte -- via pip or cloning this repo.

Note: certain features of the DataJoint python package have not been updated for more recent releases of Python. Therefore, DataJoint and epiphyte require an older version of Python (<=3.9). For this reason, we recommend using a conda environment to install all needed packages and to develop from.

Install via git

  • Clone the repository:
git clone git@github.com:mackelab/epiphyte.git
cd epiphyte
  • Create a new conda environment suitable for the epiphyte requirements:
conda create --name epiphyte python=3.9.18 ipython
  • Activate the conda environment:
conda activate epiphyte
  • Install the needed dependencies using setup.py:
pip install .
  • Verify the installation:
conda list

Or, install via pip in a conda environment

  • Create a new conda environment suitable for the epiphyte requirements:
conda create --name epiphyte python=3.9.18 ipython
  • Activate the conda environment and install epiphyte:
conda activate epiphyte
pip install epiphyte

Continue to Tutorial 4: Configure and connect to the database.