Skip to content
Basim Ramadhan edited this page Jul 4, 2017 · 11 revisions

Welcome to the lovelace-engine wiki!

Set Up VirtualBox and Vagrant

  1. Add the VirtualBox apt package repository: echo 'deb http://download.virtualbox.org/virtualbox/debian zesty contrib' | sudo tee -a /etc/apt/sources.list
  2. Download the Oracle public key for the apt repository:
    • wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
    • wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
  3. Install VirtualBox:
    • sudo apt-get update
    • sudo apt-get install virtualbox-5.1
  4. Install the latest extension pack:
    • ``VBOXVERSION=`VBoxManage --version | sed -r 's/([0-9]).([0-9]).([0-9]{1,2}).*/\1.\2.\3/'```
    • wget -q -N "http://download.virtualbox.org/virtualbox/$VBOXVERSION/Oracle_VM_VirtualBox_Extension_Pack-$VBOXVERSION.vbox-extpack"
    • VBoxManage extpack install --replace Oracle*.vbox-extpack
  5. Download the latest Vagrant from their website as a .deb file.
  6. Install Vagrant:
    • sudo dpkg -i /path/to/vagrant/deb/file
    • sudo apt-get install --fix-broken

How to Set Up Your Engine Development Environment

  1. Install virtualenv (Ubuntu): sudo apt-get install virtualenv
  2. Download the repo: git clone https://github.com/project-lovelace/lovelace-engine.git
  3. Go to the root of the repo: cd /path/to/lovelace-engine
  4. Create the virtual environment: make prepare-venv
  5. Outside the lovelace-engine repo, download the private problems repo.
  6. Create a soft link to the problem files: ln -s /path/to/lovelace-problems/problems ./problems
  7. Create a soft link to the tutorial files: ln -s /path/to/lovelace-problems/tutorials ./tutorials
  8. That's it! Just make sure to execute source env/bin/activate whenever you need to explicitly use the Python runtime and libraries inside the virtual environment.

How to Install New Libraries

  1. Make sure you're virtual environment is set up: make prepare-venv
  2. Install the new library using pip: env/bin/pip install <library-name>. If you've activated the virtual environment using source env/bin/activate, you can shorten env/bin/pip to just pip.
  3. Update the requirements.txt file in our repository with the new library: make update-requirements
  4. After you've pushed your changes to requirements.txt, other developers will also have the library when setting up their environment.