Skip to content
This repository was archived by the owner on Apr 26, 2023. It is now read-only.

Scipion image

tranquilinho edited this page May 4, 2016 · 39 revisions

How to prepare a 'Scipion image'

In short, you need the OS (Debian/Ubuntu), the libraries, Scipion itself, and the extra features

Preliminary considerations

Disk space: one wants an image small enough to be manageable, while having space enough for installing everything (excluding user data). Therefore, we recommend a 2 virtual disk setup: the system image (root disk) with 16 GB and the data disk (with enough disk space for all user data)

Note that the data disk will not be always available, so you can not include it in /etc/fstab "as is". See example below.

Example: setup disk /dev/vdc as data

mkfs -t ext4 /dev/vdc
# Add it as "not automounted" filesystem at /data
/dev/vdc       /data   ext4    defaults,noauto 0 0
mount /data
# "Automount": add next line to crontab
@reboot sudo mount /data

Operating system

We recommend Debian/Ubuntu, although you may use any Linux. You can start with one of the Ubuntu images available in cloud environments. You can also install your own Ubuntu (for example, when preparing a Virtualbox image)

Libraries

See "How to install: step 3" for a list of the packages you will need.

GPU

If you foresee that the end user will have access to a GPU when using the image, then you should prepare all the GPU-related stuff.

First, NVidia driver:

# Download the latest stable driver.
# Disable nouveau:
echo "blacklist nouveau" > /etc/modprobe.d/disable-nouveau.conf
# Update init disk
update-initramfs -u
# reboot
# install dependencies
apt-get install linux-headers-$(uname -r) build-essential
# run the binary installer
chmod u+x NVIDIA-Linux-x86_64-361.42.run
./NVIDIA-Linux-x86_64-361.42.run

Then, install CUDA (we recommend version 5.5)

The last requisite is OpenCV, which can be installed with scipion install script.

The CUDA switch will be enabled later in scipion.conf.

Scipion

Proceed with a Scipion installation at /usr/local from GitHub:

cd /usr/local
git clone https://github.com/I2PC/scipion.git
cd scipion
./scipion config

# (Optional) GPU features require manual change in config/scipion.conf:
CUDA = True

./scipion install -j 4

EM packages

We recommend the preinstallation of the following packages (since they are the most popular among users):

./scipion install -j 4  chimera ctffind4 eman2.12 frealign motioncorr relion-1.4 resmap spider

Postinstall

Free some system disk space by removing temporary files:

rm -rf /usr/local/scipion/software/tmp/* /usr/local/scipion/software/em/*.tgz

Nice extras

Usually, the VM is far away from the client computer (typically, in the cloud). Therefore, one needs some solution to enjoy low latency remote graphics display ("remote desktop").

Additionally, is pretty uncommon that the VM has a GPU for rendering. Therefore, one needs some solution to use OpenGL applications (like chimera or boxer) without graphics card ("software rendering")

The data disk is available after the image is created. Therefore, one needs some solution that allows the end user to have access to that disk easily.

Remote desktop

We recommend Guacamole. Installing Guacamole with Portable Services is very easy - just follow guacamole recipe:

mkdir -p /services/guacamole
cd /services/guacamole/
git clone https://github.com/tranquilinho/ps-scripts.git scripts
/services/guacamole/scripts/recipes/guacamole

On boot, these services must be started: guacamole server (guacd), tomcat, apache, VNC. With Portable Services, it is very easy: just run service-manager start (add it to /etc/init.d)

Software rendering

We recommend MESA.

Snapshots

From the working image, you can take a snapshot anytime. In Amazon, these snapshots are the base for creating the final image (AMI)

Publishing

Once the image is finished, the user should be able to download it.

In cloud scenarios, there are "image repositories".

Amazon: register the AMI

FedCloud

For Virtualbox, just copy the ova file to Scipion web server.

Clone this wiki locally