Skip to content

Vagrant tips

Morten W. Hansen edited this page Jan 30, 2019 · 3 revisions

Activate Python environment

When you login to the geospaas machine, you should activate the correct Python environment: source activate py3django That will set path to correct Python exectutable and allow using all install libraries.

Work on external apps

The shared folder is the root folder of django-geo-spaas. In order to keep that folder as clean as possible, you are advised to make a directory lib in which you put any apps under development. These should then be linked from the site-packages in the virtual environment:

django_geo_spaas_folder $ mkdir lib
django_geo_spaas_folder $ cd lib
django_geo_spaas_folder/lib $ git clone <some_app_repos>
django_geo_spaas_folder/lib $ cd ..
django_geo_spaas_folder $ vagrant ssh
vagrant@vagrant-ubuntu-trusty-64:~$ cd Miniconda3-4.5.1-Linux-x86_64/envs/py3django/lib/python3.6/site-packages/
vagrant@vagrant-ubuntu-trusty-64:~$ ln -s /vagrant/lib/<some_app_repos>/<app>

Note

If you need to install extra packages, this can be done with the regular pip command in the vm after activating the py3django env. However, important packages that should be default to the vm should be added in the file provisioning/conda_env_requirements.yml. For this to be installed, you need to destroy your vm and vagrant up again.

Clone this wiki locally