Running the TPP docker image
From SPCTools
Revision as of 03:33, 14 November 2018 Edeutsch (Talk | contribs) ← Previous diff |
Revision as of 03:51, 14 November 2018 Edeutsch (Talk | contribs) Next diff → |
||
Line 31: | Line 31: | ||
=== Running the TPP GUI via Docker === | === Running the TPP GUI via Docker === | ||
To run the TPP GUI, you can invoke the following command (Linux syntax): | To run the TPP GUI, you can invoke the following command (Linux syntax): | ||
- | + | ''' mkdir /tmp/tpp | |
- | ''' docker run -dit --user=root -p 10401:10401 -v /tmp/dmz/:/data/ spctools/tpp ''' | + | ''' docker run -dit --user=root -p 10401:10401 -v /tmp/tpp:/data spctools/tpp ''' |
'' 350dc6eaafe113186c2ec23810bdbc442347a86c2632284435a4b6b713013771 '' | '' 350dc6eaafe113186c2ec23810bdbc442347a86c2632284435a4b6b713013771 '' | ||
- | This will start a container running a web server from the spctools/tpp image, map port 10401 on the local machine (e.g. myhost) to the default webserver port on the container to enable access, and map a directory of your choosing (/tmp/dmz/ in this case) to /data/, the root directory for files in the tpp gui. This will give you access to your data in the tpp gui. | + | This will start a container running a web server from the spctools/tpp image, map port 10401 on the local machine to the default TPP web server port in the container to enable access, and map a directory of your choosing (/tmp/tpp in this case) to /data, the root directory for files in the TPP GUI. This will give you access to your data in the TPP GUI. the directory should be exist before starting the TPP GUI. |
=== Checking to make sure the docker is running === | === Checking to make sure the docker is running === | ||
Line 42: | Line 42: | ||
'' 350dc6eaafe1 spctools/tpp "/bin/sh -c 'apache2…" 3 seconds ago Up 1 second 0.0.0.0:10401->10401/tcp suspicious_kilby '' | '' 350dc6eaafe1 spctools/tpp "/bin/sh -c 'apache2…" 3 seconds ago Up 1 second 0.0.0.0:10401->10401/tcp suspicious_kilby '' | ||
- | You should see at least one spctools/tpp container running. To use the UI, direct your browser to the URL http://myhost:10401/tpp/cgi-bin/tpp_gui.pl where myhost is the network name of your computer (can also be IP address) You should be prompted to log in as user guest (password is guest) | + | You should see at least one spctools/tpp container running. To use the GUI, direct your browser to the URL http://myhost:10401/tpp/cgi-bin/tpp_gui.pl where myhost is the network name of your computer (can also be IP address) You should be prompted to log in as user guest (password is guest) |
=== Obtaining a copy of the default parameter files === | === Obtaining a copy of the default parameter files === | ||
- | There is directory of default parameter files included in the docker image. To download this directory to your local system (for example into the directory that you will mount in the tpp gui example above, you would run: | + | There is directory of default parameter files included in the docker image. To download this directory to your local system (for example into the directory that you will mount in the TPP GUI example above, you would run: |
- | '''docker run -v /tmp/test/:/data/ spctools/docker cp -R /usr/local/tpp/params /data/''' | + | '''docker run -v /tmp/tpp:/data spctools/docker cp -R /usr/local/tpp/params /data/''' |
+ | |||
+ | === Stopping the GUI when you're done === | ||
+ | |||
+ | When you're done using the GUI, you can stop it with something like this: | ||
+ | |||
+ | ''' docker ps ''' | ||
+ | '' CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES '' | ||
+ | '' 350dc6eaafe1 spctools/tpp "/bin/sh -c 'apache2…" 3 seconds ago Up 1 second 0.0.0.0:10401->10401/tcp suspicious_kilby '' | ||
+ | '''docker stop 350dc6eaafe1''' |
Revision as of 03:51, 14 November 2018
Overview
The docker system allows the distribution of pre-built computational units called images, which can be run on any system with the docker software installed. The spctools/tpp image is built on the BioContainers ubuntu image, and uses many of the BioContainers conventions. On some systems you may have to run these commands using sudo, a mechanism for elevating user privileges for specific tasks. The initial download described below will be relatively slow the first time it is run, since most if not all the 'layers' will have to be downloaded. Subsequent invocations will generally be much faster.
Downloading spctools/tpp docker image
As mentioned above, this may be slow the first time it is run. Subsequent runs should be considerably faster. The example below shows a pull of the latest (default) version, you can also specify a specific version if desired.
docker pull spctools/tpp Using default tag: latest Trying to pull repository docker.io/spctools/tpp ... latest: Pulling from docker.io/spctools/tpp Digest: sha256:686e9cc696fcbfd118a1ded28ae2d31218cbddd0daed68ac811400cc8833fa95 Status: Image is up to date for spctools/tpp:latest
Verifying that the image has been downloaded
To verify that you've successfully downloaded the image, you can use the images command below, and hopefully see spctools/tpp entry(s):
docker images REPOSITORY TAG IMAGE ID CREATED SIZE spctools/tpp latest ebf55696681a 24 hours ago 3.2GB spctools/tpp version5.2 ebf55696681a 24 hours ago 3.2GB
Running a specific TPP program from the docker image
If you want to run a specific program, e.g. comet, from the TPP installation, you can invoke it along with any arguments as illustrated below, where we have also mapped the local directory /tmp outside the container to the /data directory inside the Docker container, which is the current working directory inside the container by default:
docker run -v /tmp:/data spctools/tpp comet -p Created: comet.params.new
You should find a freshly created comet.params.new file in /tmp after the command completes.
Running the TPP GUI via Docker
To run the TPP GUI, you can invoke the following command (Linux syntax):
mkdir /tmp/tpp docker run -dit --user=root -p 10401:10401 -v /tmp/tpp:/data spctools/tpp 350dc6eaafe113186c2ec23810bdbc442347a86c2632284435a4b6b713013771
This will start a container running a web server from the spctools/tpp image, map port 10401 on the local machine to the default TPP web server port in the container to enable access, and map a directory of your choosing (/tmp/tpp in this case) to /data, the root directory for files in the TPP GUI. This will give you access to your data in the TPP GUI. the directory should be exist before starting the TPP GUI.
Checking to make sure the docker is running
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 350dc6eaafe1 spctools/tpp "/bin/sh -c 'apache2…" 3 seconds ago Up 1 second 0.0.0.0:10401->10401/tcp suspicious_kilby
You should see at least one spctools/tpp container running. To use the GUI, direct your browser to the URL http://myhost:10401/tpp/cgi-bin/tpp_gui.pl where myhost is the network name of your computer (can also be IP address) You should be prompted to log in as user guest (password is guest)
Obtaining a copy of the default parameter files
There is directory of default parameter files included in the docker image. To download this directory to your local system (for example into the directory that you will mount in the TPP GUI example above, you would run:
docker run -v /tmp/tpp:/data spctools/docker cp -R /usr/local/tpp/params /data/
Stopping the GUI when you're done
When you're done using the GUI, you can stop it with something like this:
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 350dc6eaafe1 spctools/tpp "/bin/sh -c 'apache2…" 3 seconds ago Up 1 second 0.0.0.0:10401->10401/tcp suspicious_kilby docker stop 350dc6eaafe1