RDKit in Docker

Dcoker is an open platform for distributed applications for developers and sysadmins.
I tried to use it.
My PC is Mac Book Air, with OSX Marvericks.
VirtualBox and Homebrew indtalled at first.
Then I tried following steps.

From terminal, I installed docker and boot2docker.

iwatobipen$ brew install docker
iwatobipen$ brew install boot2docker

After that, docker and boot2docker command will use from terminal.

make virtual machine using boot2docker init.
Then start VM using boot2docker up.

iwatobipen$ boot2docker init
iwatobipen$ boot2docker up

Edit bashrc or bash_profile some env like this.

export DOCKER_HOST=tcp://ip_hogehoge:port_hugahuga
export DOCKER_CERT_PATH=/Users/iwatobipen/.boot2docker/certs/boot2docker-vm

All of done, let’s enjoy.
Docker can download images like git.
So, I tried to search rdkit implimented images like this…

docker@boot2docker:~$ docker search rdkit
zero323/rdkit                 0                    [OK]
elijahc/rdkit                 0                    [OK]

Wah! Two images were.

Let’s get image.

docker@boot2docker:~$ docker pull elijahc/rdkit

I checked images usig docker images.

docker@boot2docker:~$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ubuntu              latest              eca7633ed783        5 days ago          192.7 MB
centos              latest              87e5b6b3ccc1        3 weeks ago         224 MB
elijahc/rdkit       latest              933f9b03997e        11 weeks ago        752.3 MB

I got elijahc/rdkit image.

Next enter the container from terminal using docker run.
*-i meants interactive, -t means use bash.

docker@boot2docker:~$ docker run -i -t elijahc/rdkit /bin/bash
root@ad013906fdf3:/# python
Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rdkit import Chem
>>> mol = Chem.MolFromSmiles("CCC")
>>> mol
   rdkit.Chem.rdchem.Mol object at 0x7fc3900d7d00>
>>> mol.GetNumAtoms()

Also there are some redmine images.
Docker is an interesting tools for developers. Easy to get rdkit images.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.