Skip to content
This repository has been archived by the owner on May 27, 2023. It is now read-only.
jason edited this page Mar 3, 2022 · 19 revisions

HOME | Biocontainer Compatibility Report | Package Installation Benchmark | GPGPU Access | Containerize Canu Assembler | Composability Feature | Developer Notice | Incompatible Images

All Commands

lpmx rootless container

Usage:
  lpmx [command]

Available Commands:
  destroy     destroy the registered container
  docker      docker command
  download    download files from online storage
  expose      expose program inside container
  get         get settings from memcache server
  help        Help about any command
  init        init the lpmx itself
  list        list the containers in lpmx system
  resume      resume the registered container
  set         set environment variables for container
  singularity singularity command
  uninstall   uninstall lpmx completely
  update      update dependencies
  version     show the version of LPMX

Flags:
  -h, --help   help for lpmx

Use "lpmx [command] --help" for more information about a command.

Common Steps for Beginners

  1. Download lpmx from lpmx release page, currently only the Linux x86_64 is supported. Though we can compile binaries as well as libraries for x86 architecture, our primary goal is supporting x86_64 arch. lpmx binary installation

  2. chmod a+x lpmx && ./lpmx init

    lpmx will automatically download its dependencies and initialize itself.

For offline initialization, please download dependency from github)

The command for offline initialization is:

"./lpmx init -d dependency_package_path"

lpmx initialization

  1. 'lpmx docker search ubuntu' to search available images on docker hub, here using ubuntu as an example.
  2. 'lpmx docker download ubuntu:14.04' to download the image from docker hub, remember to use "image:tag".

For offline users, please use 'lpmx docker commit container_id' to commit container to image, which is similar to command 'docker commit', for migration or images transmission among different machines, use 'lpmx docker package image_name' to generate tar ball. Copy this tar ball to new machine, then use 'lpmx docker add tar_ball' to your new lpmx system.

  1. 'lpmx docker create ubuntu:14.04' to create container based on the already downloaded image.
    And now you should be inside container.

LPMX Docker related sub-commands


'lpmx docker' is a sub-command to process Docker images on DockerHub, by using this command, users can search, download, create and package container based on Docker images.


Usage:
  lpmx docker [command]

Available Commands:
  add         add the local docker image to system
  commit      commit docker container
  create      initialize the local docker images
  delete      delete the local docker images
  download    download the docker images from docker hub
  fastrun     run container in a fast way without switching into shell
  list        list local docker images
  load        load the 'docker save' generated tar ball to system
  package     package the docker images from docker hub for offline usage
  reset       reset local docker base layers
  search      search the docker images from docker hub

Flags:
  -h, --help   help for docker

Use "lpmx docker [command] --help" for more information about a command.

Introduction of lpmx docker sub-command

  • 'lpmx docker add':
    • add local image packaged via command 'lpmx docker package'
  • 'lpmx docker commit':
    • commit container content(similar to 'docker commit')
  • 'lpmx docker create':
    • create contaienr based on downloaded docker images from Docker Hub
  • 'lpmx docker delete':
    • delete local downloaed Docker images
  • 'lpmx docker download':
    • download docker images from Docker Hub
  • 'lpmx docker fastrun':
    • create, run and destroy a container in a fast way, it is usually used for fast testing
  • 'lpmx docker list':
    • list all downloaded Docker images
  • 'lpmx docker load':
    • load the 'docker save' generated tar ball
  • 'lpmx docker package':
    • package local images to tar balls
  • 'lpmx docker reset':
    • reset downloaded images(re-extraction)
  • 'lpmx docker search':
    • search images on Docker Hub

Use cases for docker sub-command:

-bash-4.1$ lpmx docker search
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker search [flags]

Flags:
  -h, --help   help for search

(Note) result contains target name and available tags for this name. If name does not exist in docker hub, then error occurs.

lpmx docker search

-bash-4.1$ lpmx docker download
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker download [flags]

Flags:
  -h, --help          help for download
  -m, --merge         merge all layers(optional)
  -p, --pass string   optional
  -u, --user string   optional

lpmx docker download

-bash-4.1$ lpmx list
list command is the basic command of lpmx, which is used for listing all the containers registered

Usage:
  lpmx list [flags]

Flags:
  -h, --help   help for list

lpmx docker list

-bash-4.1$ lpmx docker create
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker create [flags]

Flags:
  -h, --help            help for create
  -n, --name string     optional
  -v, --volume string   optional

(Note) lpmx will automatically create and open bash shell.

lpmx docker create

-bash-4.1$ lpmx docker delete
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker delete [flags]

Flags:
  -h, --help         help for delete
  -p, --permernant   permernantly delete all layers of the target image(optional)

(Note) docker image is removed locally

-bash-4.1$ lpmx docker commit
Error: required flag(s) "id", "name", "tag" not set
Usage:
  lpmx docker commit [flags]

Flags:
  -h, --help          help for commit
  -i, --id string     required
  -n, --name string   required
  -t, --tag string    required

(Note) lpmx will commit current container and create an image with given name and tag

lpmx docker commit

-bash-4.1$ lpmx docker package
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker package [flags]

Flags:
  -h, --help          help for package
  -p, --pass string   optional
  -u, --user string   optional

(Note) lpmx will create a package (tar.gz) file containing evrything

lpmx docker commit

-bash-4.1$ lpmx docker add
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker add [flags]

Flags:
  -h, --help   help for add

(Note) lpmx will import previously packaged tar file, so that you can create container based on newly imported image.

lpmx docker add

-bash-4.1$ lpmx docker load
Error: accepts 1 arg(s), received 0
Usage:
  lpmx docker load [flags]

Flags:
  -h, --help   help for load

(Note) lpmx will import 'docker save' command generated tar file. Note that, this comamand only receives the output of 'docker save' command.

lpmx docker load

-bash-4.1$ lpmx docker fastrun
Error: accepts 2 arg(s), received 0
Usage:
  lpmx docker fastrun [flags]

Flags:
  -h, --help            help for fastrun
  -v, --volume string   optional

(Note) lpmx will create a container and run the given command inside it, then will remove it after run. Similar to 'docker run --rm -it IMAAGE COMMANDS'

lpmx fastrun

LPMX Singularity related sub-commands

'lpmx singularity' is a sub-command supports Singularity image (SIF image), by using this command, users can import and create containers based on Singularity images. (Experimental Feature Currently)

singularity command is the advanced command of lpmx, which is used for executing singularity related commands

Usage:
  lpmx singularity [command]

Available Commands:
  create      initialize the local singularity images
  delete      delete the local singularity images
  fastrun     run container in a fast way without switching into shell
  list        list local singularity images
  load        load local sif image

Flags:
  -h, --help   help for singularity

Use "lpmx singularity [command] --help" for more information about a command.

Similar to 'lpmx docker' command, 'lpmx singularity' command supports loading SIF images, and create containers based on loaded images. Commands listed above have the same options as listed in 'lpmx docker' command.


Other shared comamnds

'lpmx init' command is used for initializing the basic system folder of lpmx, it stores information of containers and other information(Users should call this command before using lpmx)

init command is the basic command of lpmx, which is used for initializing lpmx system

Usage:
  lpmx init [flags]

Flags:
  -d, --dependency string   dependency tar ball(optional)
  -h, --help                help for init
  -r, --reset               initialize by force(optional)
  • 'lpmx init' supports offline initialization with dependency tar ball, i.e, 'lpmx init -d dependency.tar.gz', initializing lpmx in offline mode.

'lpmx list' command is used for listing the information of all the registered containers, including containerid, container rpc port(NA for no rpc port)

list command is the basic command of lpmx, which is used for listing all the containers registered

Usage:
  lpmx list [flags]

Flags:
  -h, --help   help for list

lpmx list


'lpmx resume' command is used for resuming stopped container, you need to use this command with container id argument

resume command is the basic command of lpmx, which is used for resuming the registered container via id

Usage:
  lpmx resume [flags]

Flags:
  -h, --help   help for resume

lpmx resume


'lpmx destroy' command is used for destroying container, i.e deleting configuration files

destroy command is the basic command of lpmx, which is used for destroying the registered container via id

Usage:
  lpmx destroy [flags]

Flags:
  -h, --help   help for destroy

Example:
  ./lpmx destroy containerid

lpmx destroy


'lpmx expose' command is used for exposing applications inside containers to host, i.e, users can directly call apps inside containers from host OS.

To run this command, you should stop current running container.
expose command is the advanced command of lpmx, which is used for exposing binaries inside containers to host, id is the container id containing the exposed program, name is the customized name given by end-users, path is the full path of program inside the container

Usage:
  lpmx expose [flags]

Flags:
  -h, --help          help for expose
  -i, --id string     required
  -n, --name string   required
  -p, --path string   required

lpmx expose


'lpmx get' command is used for getting app settings from memcache server, values are set by using 'lpmx set' command.

get command is the basic command of lpmx, which is used for getting settings from cache server

Usage:
  lpmx get [flags]

Flags:
  -h, --help          help for get
  -i, --id string     required
  -n, --name string   required

'lpmx get' is used for getting the value of 'lpmx set' commands.

'lpmx set' command is used for setting environment variables for containers dynamically

set command is an advanced comand of lpmx, which is used for setting environment variables of running containers, you should clearly know what you want before using this command, it will reduce the performance heavily

Usage:
  lpmx set [flags]

Flags:
  -h, --help           help for set
  -i, --id string      required(container id, you can get the id by command 'lpmx list')
  -n, --name string    required(should be the name of libc 'system calls wrapper')
  -t, --type string    required('add_map','remove_map')
  -v, --value string   required(value(file1:replace_file1;file2:repalce_file2;))

'lpmx set' is very important for providing composability feature, an existing/unexisting path can be mapped to any paths from the host or in other containers. e.g. lpmx set -i CONTAINER_ID -t add_exec -n PATH_IN_CONTAINER -v REPLACED_PATH_ON_THE_HOST

check the following gif: samtool

Clone this wiki locally