Skip to content

Using the IMOS User Code Library from a Virtual Machine

Ana Berger edited this page Oct 13, 2020 · 13 revisions

A virtual machine (vm) is also available to test the IMOS user code library, without modifying your working environment. It can be run from any OS (Windows, MacOS, Linux). All the Python and R packages are already set up in the vm and ready to go.

The vm runs a Ubuntu 12.04 32bits version of unix, with a lightweight environment (enlightenment) in order to be run even on older computers.

#1 - Getting started

1.1 - Install Virtual Box

VirtualBox is a cross-platform virtualization application, needed to launch the IMOS user code library virtual machine

Please download the version related to your OS here: https://www.virtualbox.org/wiki/Downloads

Download the IMOS user code library virtual machine (~ 1.1 Gb): http://data.aodn.org.au/IMOS/public/eMII/demos/imos-user-code-library.ova

1.2 - Importing an Existing Virtual Machine into VirtualBox

Double click on the imos_user_code_library.ova you have just downloaded, and click on Import, or please refer to: http://docs.oracle.com/cd/E26217_01/E26796/html/qs-import-vm.html

1.3 - Login to the virtual machine

Once the virtual machine is imported on virtual box, start the virtual machine from Virtual Box by double clicking on the imported virtual machine, or by clicking on the 'start' button. This could take up to a minute depending on your machine.

You should be auto-logged automatically. If a prompt appears, you can login with the following credentials:

  • login : vagrant
  • password : vagrant

2 - Running the IMOS examples

The IMOS user code library is accessible from the virtual machine desktop. (an internet connection is required to launch the different examples. Some files can be relatively large, the faster your connection is, the better)

2.1 - Python Examples

For a full description of the different Python examples, please read the associated wiki page: https://github.com/aodn/imos-user-code-library/wiki/Using-the-IMOS-User-Code-Library-with-Python

To launch python examples, please go to ~/Desktop/IMOS_user_code_library/Python/demos

You can double click on any *.py script. This will launch iPython, and display a plot of the data requested

You can also run an example from your shell (to open a shell, an icon button is available on your task-bar):

cd ~/Desktop/IMOS_user_code_library/Python/demos
python dwm.py

2.2 - R Examples

For a full description of the different R examples, please read the associated wiki page: https://github.com/aodn/imos-user-code-library/wiki/Using-the-IMOS-User-Code-Library-with-R

To launch R examples: Open a terminal window from the task-bar (bottom right).

Type in your VM's terminal :

cd ~/Desktop/IMOS_user_code_library/R/demos
R

If you are interested in visualising a dataset from the ACORN facility, type in the R console:

source('acorn.R')