Container Toolshed. A CLI tool manager for creating container centric namespaces with specific tools installed. This could possibly help to easier manage cli tools for users (multiple tool versions, no screw-up with os level package executables)
# a single tool executable, debian:stable implicit source
ctshed install --packages=curl --cmd=curl mycurl
# downloads the P04156.fasta file and saves it in the current directory
ctshed-mycurl -LO https://www.uniprot.org/uniprot/P04156.fasta
# a tool namespace
ctshed install --source=biocontainers/blast:2.2.31 myblast
ctshed-myblast curl -LO https://www.uniprot.org/uniprot/P04156.fasta
ctshed-myblast curl -LO ftp://ftp.ncbi.nih.gov/refseq/D_rerio/mRNA_Prot/zebrafish.1.protein.faa.gz
ctshed-myblast gunzip zebrafish.1.protein.faa.gz
ctshed-myblast makeblastdb -in zebrafish.1.protein.faa -dbtype prot
ctshed-myblast blastp -query P04156.fasta -db zebrafish.1.protein.faa -out results.txt
pip install ctshed
The tool places binaries to ~/bin
directory blindly without checking if it
exists or if theres a nameclash. Make sure ~/bin
exists in your path. E.g.
place something like this in ~/.bash_rc
:
#~/.bash_rc file
export PATH="$HOME/bin:$PATH"
The tool depends on docker
binary existing on the host system. You have to
install it if you don't have it. Installation of docker on ubuntu
systems is described docker-ce/ubuntu
- Create a docker based tool namespace
- Create an executable with specific tool installation
- An image is created during the install step and some name is automatically given to it.
- An executable is created in executable directory of the users workspace.
- Executable contains a container run command with stdin/stdout/stderr attached and /home directory mounted.
python -m unittest discover tests
There are limitations with using container as a wrapper for command line.
- Configuration might not be picked up by the tool.
- Input/Output works correctly only under /home directory
- Security, because /home is mounted
- More will come.