vais-ral / CCPi-VirtualMachine

Set of scripts and configuration to prepare VM based on Scientific Linux 7 from scratch with CCPi from binaries or source codes.
MIT License
2 stars 2 forks source link

CCPi Virtual Machine

This repository contains scripts to create virtual machine with installed CCPi software for tomographic imaging from scratch. VM includes virtual environment with Python 3.x and all CCPi repositories installed using conda tool at /opt/ccpi path. Currently preprocessing, reconstruction, quantification, segmentation and regularisation are present.

Requirement:

Brief installation from binaries

Type in your command line:

git clone https://github.com/vais-ral/CCPi-VirtualMachine.git
cd CCPi-VirtualMachine/ccpi-vm-from-binaries
vagrant up

Other installation options

Installation from CVMFS

(3mins) This option is for general user who wants use latest released CCPi libraries to process data. It use minimal Scientific Linux 7 with XFCE4 GUI VM template, CCPi is preinstalled in CVMFS repository which is mounted into read-only /cvmfs. Bootstrap is rapid (3 mins) and CCPi binaries are transparently downloaded to VM cache (cernvmfs) on demand, so first launch of ccpi libraries and tools may take significantly longer time depending on connection speed.

git clone https://github.com/TomasKulhanek//CCPi-VirtualMachine.git
cd CCPi-VirtualMachine
cd ccpi-vm-from-cvmfs
vagrant up

Installation from binaries

(15-20 mins) This option is for general user who wants use latest released CCPi libraries and want to control the virtual python environment, in order to customize it. It uses minimal Scientific Linux 7 with XFCE4 GUI VM template, binaries of CCPi is installed using conda tool and ccpi channel.

git clone https://github.com/TomasKulhanek//CCPi-VirtualMachine.git
cd CCPi-VirtualMachine
cd ccpi-vm-from-binaries
vagrant up

Installation from sources

(40-120 mins) This option is for developer user who wants to first download and build CCPi libraries from sources, e.g. in order to develop or add some functionality or test. This option uses same VM template, but installs the CCPi packages from sources. Modify the scripts/bootstrapsrc.sh in order to build or ommit particular packages.

git clone https://github.com/TomasKulhanek//CCPi-VirtualMachine.git
cd CCPi-VirtualMachine
cd ccpi-vm-from-sources
vagrant up

Installation with empty environment

(5-10 mins) This option is for developer user who wants just prepare initial environment,e.g. to develop and build custom CCPi libraries from sources. This option uses same VM template, but does not install any CCPi packages. Modify the scripts/bootstrapempty.sh in order to build or ommit particular packages.

git clone https://github.com/TomasKulhanek//CCPi-VirtualMachine.git
cd CCPi-VirtualMachine
cd ccpi-vm-from-sources
vagrant up

After installation

To access terminal of virtual machine, type:

To access desktop, open VirtualBox and click the running virtual machine to show accees it's desktop.

The VM contains apache web server and Python 3 virtual environment with selected Jupyter notebook available at /jupyter context path. To access web UI of jupyter notebook, go http://localhost:[port]/jupyter/ (the [port] is 8080 and is forwarded to guest port 80, consult exact port in Vagrantfile). Demo notebooks are available after clicking notebooks folder or directly at http://localhost:[port]/jupyter/tree/notebooks/

The CCPi installation of Python 3.x and all CCPi dependent modules are present at /opt/ccpi/ directory or at /cvmfs/west-life.egi.eu/software/ccpi/latest. Virtual environment with Python 3 is activated by default in BASH using conda activate. In order to exchange files between guest and host, the /vagrant is mapped to guest path of the CCPi-VirtualMachine directory. Follow https://cil.readthedocs.io and binary installation option for PATH /opt/ccpi.

Vagrant up screenshot