
Bioinformatics with Python Cookbook
By :

Docker is the most widely used framework that implements operating system-level virtualization. This technology allows you to have an independent container: a layer that is lighter than a virtual machine, but still allows you to compartmentalize software. This mostly isolates all processes, making it feel like each container is a virtual machine.
Docker works quite well at both extremes of the development spectrum: it's an expedient way to set up the content of this book for learning purposes and may be your platform to deploy your applications in complex environments. This recipe is an alternative to the previous recipe. However, for long-term development environments, something along the lines of the previous recipe is probably your best route, although it can entail a more laborious initial setup.
If you are on Linux, the first thing you have to do is to install Docker. The safest solution is to get the latest version from https://www.docker.com/. While your Linux distribution may have a Docker package, it may be too old and buggy (remember the "advancing at breakneck speed" thingy?).
If you are on Windows or Mac, do not despair; boot2docker (http://boot2docker.io/) is here to save you. Boot2docker will install VirtualBox and Docker for you, which allows you to run Docker containers in a virtual machine. Note that a fairly recent computer (well, not that recent, as the technology was introduced in 2006) is necessary to run our 64-bit virtual machine. If you have any problems, reboot your machine and make sure that on the BIOS, VT-X or AMD-V is enabled. At the very least, you will need 6 GB of memory, preferably more.
Note that this will require a very large download from the Internet, so be sure that you have a big network pipe. Also, be ready to wait for a long time.
These are the steps to be followed:
docker build -t bio https://raw.githubusercontent.com/tiagoantao/bioinf-python/master/docker/2/Dockerfile
docker run -ti -p 9875:9875 -v YOUR_DIRECTORY:/data bio
YOUR_DIRECTORY
with a directory on your operating system. This will be shared between your host operating system and the Docker container. YOUR_DIRECTORY
will be seen in the container on /data and vice versa.-p 9875:9875
will expose the container TCP port 9875
on the host computer port 9875
.boot2docker
, the final configuration step will be to run the following command in the command line of your operating system, not in boot2docker:VBoxManage controlvm boot2docker-vm natpf1 "name,tcp,127.0.0.1,9875,,9875"
On Windows, this binary will probably be in C:\Program Files\Oracle\VirtualBox
.
On a native Docker installation, you do not need to do anything.
http://localhost:9875
, you should be able to get the IPython Notebook server running. Just choose the Welcome notebook to start!Change the font size
Change margin width
Change background colour