The SDK can be installed and used purely as a Docker container. This removes the need to install the dependencies for running the SDK such as Java and ant. Currently this method is only supported with a bash shell and has been tested on Docker for Mac and Linux.
- Install SDK Dependencies
- Install SDK with Docker
- Create Module
- Edit Module and Method(s)
- Locally Test Module and Method(s)
- Register Module
- Test in KBase
- Complete Module Info
- Deploy
Now that Docker is installed, you can pull down the KBase SDK image.
docker pull kbase/kb-sdk
Now, initialize the bash environment to add an alias for the kb-sdk command. There is a setup routine that will emit the proper bash commands to create the alias. Run this command to add it. You will need to do this for any new shell. Alternatively, you can add this command to your .bashrc or cut and paste the output of the setup command into your .bashrc.
eval $(docker run kbase/kb-sdk setup)
The alias will work for most cases. However, aliases are ignored in by the make utility. If you wish to be able to invoke kb-sdk from make (and not running in a docker build), then it is best to create a wrapper script. The kb-sdk docker image can generate this script. This script can be placed anywhere you wish, but it should be on your path. In this example, we will install it in $HOME/bin/.
docker run kbase/kb-sdk genscript > $HOME/bin/kb-sdk
chmod 755 $HOME/bin/kb-sdk
export PATH=$PATH:$HOME/bin/kb-sdk
Test the installation by running the kb-sdk help command.
kb-sdk help
All KBase modules run in Docker containers. Docker containers are built on top of existing base images. KBase has a public base image that includes a number of installed runtimes, some basic Bioinformatics tools, and other KBase specific tools. To run this locally, you will need to download the base image.
kb-sdk sdkbase
The Image is fairly large, so this will take some time to download. This step is required for running tests locally and should only be reqired during the initial installation. However, KBsae staff may occasionally require the base image to be updated in order to match any changes in the base image running in the production KBase platform.