-
Notifications
You must be signed in to change notification settings - Fork 3
Install (Developer)
Setting up VariantGrid on your own machine, to run with runserver. For a deployed server see
Install (Server).
The dependency installer is tested on Ubuntu 20, 22, 24 and 26 (see the header of
scripts/install/ubuntu_install_dependencies.sh). Instructions below assume a recent Ubuntu.
For MacOS see Install on MacOS.
Use your normal account — no service user is needed.
sudo apt-get install git
# Wherever you want to install repo, eg cd ~/localwork
git clone https://github.com/SACGF/variantgrid
# Installs system dependencies via apt-get (Python packages are installed separately, into a venv)
sudo variantgrid/scripts/install/ubuntu_install_dependencies.sh
VariantGrid keeps database passwords and other sensitive values out of source control, in a file it
looks for at /etc/variantgrid/settings_config.json. config/settings_config.json in the repo is a
template to start from:
sudo mkdir /etc/variantgrid
sudo cp variantgrid/config/settings_config.json /etc/variantgrid
Leave it owned by you, so the account you run VariantGrid as can read it.
Now edit /etc/variantgrid/settings_config.json — see Settings for which values a fresh install
needs to change and how to check it parses. The database section has to match the database you create
in the common steps below.
Create the virtual environment and install the Python requirements — see Install Python venv.
Every python3 manage.py ... command assumes you have activated it, and is run from the VariantGrid
install dir.
Each machine gets its own settings file named after its hostname. Copy the developer template — it
sets DEBUG = True and serves over plain HTTP, and lives in env_developers/ so your config stays
out of source control:
cd variantgrid
# Create settings file for this machine (lowercase hostname with dashes removed)
cp variantgrid/settings/env_developers/_settings_template.py variantgrid/settings/env_developers/$(hostname | tr '[:upper:]' '[:lower:]' | tr -d -).py
The server template in env/ sets secure cookies, which browsers never store over runserver's plain
HTTP — copy that one by mistake and you would be unable to log in, so runserver refuses to start and
tells you why.
Now do the shared part of the install — database, annotation, VEP and the upgrader: Install.
Come back here when you reach the end of that page.
python3 manage.py runserver
See Run VariantGrid for the Celery workers you need for async work (imports, annotation), and Developer Setup and Tips for debugging, SCSS and linting.