This post is here as a reminder of what I did to setup my coding environment. If it is of any use or interest to anyone else then that’s great 🙂
First up I set up a VirtualBox VM on my desktop (from Entroware!). It is running an Ubuntu Mate 16.04 guest, but I guess that is inconsequential, as it could be running any version. It has the VirtualBox Additions installed, NAT and Bridge Adaptor networking are enabled, and a shared folder on the host has been setup.
On the guest, the shared folder is mounted using the command:
sudo mount -t vboxsf -o uid=1000 sharedVMfolder path/to/mountpoint
Anaconda Python has been installed on the guest and a new environment called spatialP3 has been created using:
conda create --name spatialP3
This is activated using:
source activate spatialP3
In that environment, a number of spatial libraries have been installed using:
conda install --name spatialP3 packagename
There were a number of version conflicts with some of the default packages, so I searched the Anaconda Cloud to find the most recent packages and installed them from the Anaconda Cloud repository using:
conda install -c conda-forge shapely=1.5.16
To launch a Jupyter Notebook server with no local display (i.e. on the guest) use:
jupyter notebook --ip=0.0.0.0 --no-browser
Port forwarding has been set up in Virtualbox using the TCP protocol and with the host port being 8899 and the guest port being 8888 (the default for Jupyter Notebooks).
This means that you can run the notebooks from the host (as long as the VM and Jupyter server are both running) by typing the following into your browser:
or from any machine on the network by typing in the local IP address of the host machine and the port 8899. If you start them in the correct location i.e. the shared folder that was mounted in the VM, then the notebooks will be accessible irrespective of whether the VM is running, and can be part of a backup strategy for the host machine.