User Tools

Site Tools


hpc:docker

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
hpc:docker [2015/01/30 16:39]
jchilders
hpc:docker [2015/01/30 16:49]
jchilders
Line 29: Line 29:
 79924a46c804: Download complete 79924a46c804: Download complete
 Status: Downloaded newer image for cern/slc6-base:latest Status: Downloaded newer image for cern/slc6-base:latest
 +-> docker pull cern/slc6-base:6.5
 -> docker images -> docker images
 REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 cern/slc6-base      6.6                 3d85e4d2d936        12 weeks ago        911.1 MB cern/slc6-base      6.6                 3d85e4d2d936        12 weeks ago        911.1 MB
 cern/slc6-base      latest              3d85e4d2d936        12 weeks ago        911.1 MB cern/slc6-base      latest              3d85e4d2d936        12 weeks ago        911.1 MB
 +cern/slc6-base      6.5                 79924a46c804        6 months ago        402 MB
 -> docker run cern/slc6-base:6.5 uname -a -> docker run cern/slc6-base:6.5 uname -a
 Linux f4eea7db246b 3.16.7-tinycore64 #1 SMP Tue Dec 16 23:03:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Linux f4eea7db246b 3.16.7-tinycore64 #1 SMP Tue Dec 16 23:03:39 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
  
 +</code>
 +
 +As a test I installed ROOT via yum into the image. The first command here starts an interactive container.
 +
 +<code console>
 +-> docker run -i -t cern/slc6-base:6.5
 +[root@19035251353f /]# yum install root.x86_64
 +.
 +. < yum installation STDOUT goes here >
 +.
 +[root@19035251353f /]# root -b
 +  *******************************************
 +  *                                         *
 +  *        W E L C O M E  to  R O O T       *
 +  *                                         *
 +  *   Version   5.34/20    12 August 2014   *
 +  *                                         *
 +  *  You are welcome to visit our Web site  *
 +  *          http://root.cern.ch            *
 +  *                                         *
 +  *******************************************
 +
 +ROOT 5.34/20 (heads/v5-34-00-patches@v5-34-19-251-gfb37e88, Aug 29 2014, 05:50:00 on linuxx8664gcc)
 +
 +CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
 +Type ? for help. Commands must be C++ statements.
 +Enclose multiple statements between { }.
 +root [0] .q
 +[root@19035251353f /]# exit
 +-> docker ps -l
 +CONTAINER ID        IMAGE                COMMAND             CREATED             STATUS                     PORTS               NAMES
 +19035251353f        cern/slc6-base:6.5   "bash"              29 minutes ago      Exited (0) 3 seconds ago                       ecstatic_brattain
 +-> docker commit -m "SLC6.5 with ROOT 5.34/20 installed" -a "Taylor Childers" 19035251353f jtchilders/slc65:root534
 +e0ebe08a3fce057499fcefdf6132c7e57aca605a1830f0abc84f97e431094cb2
 +</code>
 +
 +Now I have my own SLC6.5 container with ROOT 5.34 installed.
 +
 +Next I played with trying to run a root script so I made one:
 +<code bash>
 +mkdir vlocal
 +vim vlocal/root_test.C
 +</code>
 +
 +<code c | root_test.C>
 +#include <string>
 +#include <iostream>
 +
 +int root_test(void){
 +   string test = "Hello World";
 +
 +   std::cout << test << "\n";
 +
 +   return 0;
 +}
 +</code>
 +
 +Then I wanted my container to mount my local directory and use this file:
 +
 +<code console>
 +-> docker run --volume=$PWD/vlocal:/vcont jtchilders/slc65:root534 root -b -q /vcont/root_test.C
 +  *******************************************
 +  *                                         *
 +  *        W E L C O M E  to  R O O T       *
 +  *                                         *
 +  *   Version   5.34/20    12 August 2014   *
 +  *                                         *
 +  *  You are welcome to visit our Web site  *
 +  *          http://root.cern.ch            *
 +  *                                         *
 +  *******************************************
 +
 +ROOT 5.34/20 (heads/v5-34-00-patches@v5-34-19-251-gfb37e88, Aug 29 2014, 05:50:00 on linuxx8664gcc)
 +
 +CINT/ROOT C/C++ Interpreter version 5.18.00, July 2, 2010
 +Type ? for help. Commands must be C++ statements.
 +Enclose multiple statements between { }.
 +
 +Processing /vcont/root_test.C...
 +Hello World
 +(int)0
 </code> </code>
hpc/docker.txt · Last modified: 2015/05/20 19:52 by jchilders