kbaseattic / assembly

An extensible framework for genome assembly.
MIT License
12 stars 14 forks source link

Package into Docker Container #74

Open cbun opened 10 years ago

cbun commented 10 years ago

Install Docker

http://docs.docker.com/installation/

As root, in GNU Screen (so we can stop the container from another shell)

screen
sudo su

Pull Compute Image from Repository

$ docker pull 10.0.28.9:8000/assembly:compute

Check if image pulled

$ docker images
REPOSITORY                     TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
10.0.28.9:8000/assembly   compute             6974d25316ad        2 hours ago         3.943 GB

Create temporary virtual /mnt/data in the image and run

$ docker run -v /mnt/data 6974d25316ad /bin/sh -c "cd /home/assembly/lib/assembly; ./ar_computed.py -s 10.0.28.15 -c ar_compute.conf"

 [.] Starting Assembly Service Compute Node
 [.] Retrieved Shock URL: 140.221.84.205:8000
 [.] AssemblyRAST host: 10.0.28.15
 [.] MongoDB port: 27017
 [.] RabbitMQ port: 5672
 [.] MongoDB connection successful.
 [.] Connecting to Shock server...
 [.] Shock connection successful
 [.] Storage path -- /mnt/data : OKAY
 [.] Binary path -- /home/assembly/third_party : OKAY

Enter different shell, check running containers

$ sudo docker ps

CONTAINER ID
47585ba9d699

Stop container

$ sudo docker stop 47585ba9d699
levinas commented 10 years ago

Added you guys to the docker group on SAL. If you log back in, non-root docker commands should work.

levinas commented 10 years ago

The image size keeps growing. There's some discussion on flattening docker images. I don't see a good solution yet. https://github.com/dotcloud/docker/issues/332