Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
96 lines (74 sloc) 3.74 KB

Developer Guide

Run a full development build

Use the following instructions if you want to run a full development build, compile the code, and build the Docker images locally.


  • go: a working Go environment is required to build the code

  • glide: the glide package manager for Go (

  • npm: the Node.js package manager ( for building the Web UI

  • Go is very specific about directory layouts. Make sure to set your $GOPATH and clone this repo to a directory $GOPATH/src/ before proceeding with the next steps.

Then, fetch the dependencies via:

glide install

Define the following environment variables:

export SHARED_VOLUME_STORAGE_CLASS=<StorageClass> # "" for DIND, "ibmc-file-gold" for IBM Cloud
export PUBLIC_IP=<IP_TO_CLUSTER> # One exposed IP of cluster
export DOCKER_REPO=<registry endpoint> # Registry if used, e.g. for DockerHub is ""
export DOCKER_REPO_USER=<REPOSITORY_USER> # Container Registry Username
export DOCKER_REPO_PASS=<PASSWORD_TO_YOUR_REPOSITORY> # Container Registry Password
export DOCKER_NAMESPACE=<NAMESPACE_ON_IBM_CLOUD> # Container Registry Namespace
export DOCKER_PULL_POLICY=Always # Keep IfNotPresent if not pushing to registry, e.g. for Minikube
export VM_TYPE=none
export NAMESPACE=default # If your namespace does not exist yet, please create the namespace `kubectl create namespace $NAMESPACE` before proceeding to the next step

Compile the code, generate certificates, and build the Docker images via:

make build             # Compile FfDL
make gen-certs         # Generate certificated
make docker-build-base # Build base Docker images
make docker-build      # Build Docker images

If you want to push the images you just built, run:

make docker-push # Push built Docker images to registry, not used for Minikube

Make sure kubectl points to the right target context/namespace, then deploy the services to your Kubernetes environment (using helm):

kubectl config set-context $(kubectl config current-context) --namespace=$NAMESPACE # Set your current-context to the FfDL namespace
make create-volumes # Create static volumes for sharing across pods
make deploy-plugin # Deploy S3 storage plugin
make deploy # Deploy FfDL


If your Object Storage Driver is not successfully installed on your Kubernetes, you can following the step by step instructions at ibmcloud-object-storage-plugin.

If you encounter other issues, please take a look at the experimental


There are experimental scripts to setup FfDL including all of its dependencies like Docker, Go, Kubernetes, S3 drivers and the Docker registry starting from an empty SoftLayer VM. You can find them in bin/dind_scripts. To start on a fresh VM login as root and run:

apt install -y git software-properties-common
mkdir -p /home/ffdlr/go/src/ && cd $_ && git clone && cd FfDL
cd bin/dind_scripts/
chmod +x

Then log back into the VM as the user ffdlr and run

cd /home/ffdlr/go/src/
sudo chmod +x

Instructions on GPU workloads

Please refer to the for more details.

Enable custom learner images with development build

Please add the following section under trainer/trainer/frameworks.go and rebuild the trainer image to enable custom learner images from any users.

if fwName == "custom" {
  return true, ""