Skip to content

Local Setup

Siqi Tian edited this page Feb 5, 2017 · 7 revisions

First, set up llvm, which is used by llvmlite and numba that accelerates primerize for loops. Create a /etc/apt/sources.list.d/llvm.list file with the following content:

deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty main
# 3.6 
deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main
deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main  

Now you can use apt-get to install llvm. Due to the complicated compatibility issues between llvm, which is used by llvmlite and numba, use either:

llvm == 3.6.2
llvmlite == 0.8.0
numba == 0.23.1

or (current):

llvm == 3.7.1
llvmlite == 0.12.1
numba == 0.27.0

These packages are excluded from upd command so you won't accidentally update them. In the far future, if this combination has components that are out of support, updating all into newer (still compatible with each other) versions should be carried out.

Other package archives we use to keep git, Apache and MySQL up to date are git-core/ppa and ondrej/apache2. Use sudo add-apt-repository ppa:ppa_name to add to system.

Second, you need to install gdrive for Google Drive connections. You can retrieve from the backup/backup_config.tgz, or download here.

Commonly used commands are provided as aliases for shortcut. They are defined in /home/ubuntu/.bash_profile.

Command Description
upd Updates apt-get and pip packages, cleans up old packages, and runs dj_man versions. Afterwards, make sure Apache is running with worker, NOT prefork!
sync Complete procedure for updating server code: pulls repository, runs util_minify.sh, util_sys_asset.sh, util_chmod.sh, and restarts Apache server.
a2rs Restarts Apache server.
a2st Full status of Apache server.
swap_on, swap_off Toggle 2 GB of memory swap. Use upon restart of the server.
dj_man Shortcut for Django management commands.
dj_cron Shortcut for crontab of www-data user.
cl_a2a, cl_a2e Show log of Apache access / error.
cl_cron Show log of crontab.
cl_dj Show log of Django.

Clone this wiki locally