Tutorial: Launch the MySQL database locally¶
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:¶
The installation of epiphyte
has three steps:
- Install and set-up the DataJoint docker container.
- Download and launch the DataJoint MySQL server via docker-compose.
- Install
Epiphyte
.
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
- Install Docker Compose.
- Verify the Docker Compose installation:
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