-
Notifications
You must be signed in to change notification settings - Fork 0
cdot.cc install log
Dave Lawrence edited this page Aug 29, 2022
·
10 revisions
sudo bash
apt-get update
apt-get upgrade -y
apt-get install -y git-core python3-venv redis nginx
# Users and source code
SYSTEM_CDOT_USER=cdot
CDOT_REST_INSTALL_DIR=/opt/cdot_rest
id -u ${SYSTEM_CDOT_USER} &>/dev/null || useradd ${SYSTEM_CDOT_USER} --create-home --shell "/bin/bash"
mkdir -p ${CDOT_REST_INSTALL_DIR}
chown ${SYSTEM_CDOT_USER} ${CDOT_REST_INSTALL_DIR}
chgrp ${SYSTEM_CDOT_USER} ${CDOT_REST_INSTALL_DIR}
su ${SYSTEM_CDOT_USER}
CDOT_REST_INSTALL_DIR=/opt/cdot_rest # Again for user
cd ${CDOT_REST_INSTALL_DIR}
if [ ! -e ${CDOT_REST_INSTALL_DIR}/.git ]; then
git clone https://github.com/sacgf/cdot_rest.git .
fi
# Install Python libraries
mkdir venv
python3 -m venv venv/cdot
source /opt/cdot_rest/venv/cdot/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install gunicorn # Install into venv so it gets libraries
python3 -m pip install -r requirements.txt
# As root
mkdir /var/log/cdot_rest
chown cdot /var/log/cdot_rest
mkdir /run/gunicorn
chown cdot /run/gunicorn/
cp config/gunicorn.service /lib/systemd/system
systemctl enable gunicorn
Either download the data, or see cdot instructions on how to create data from scratch
# Virtual environment
sudo su cdot
cd /opt/cdot_rest
source venv/cdot/bin/activate
Insert data
python3 manage.py import_transcript_json cdot-0.2.8.refseq.grch37_grch38.json.gz --annotation-consortium=RefSeq
python3 manage.py import_transcript_json cdot-0.2.8.ensembl.grch37_grch38.json.gz --annotation-consortium=Ensembl