Skip to content

Installation

Prerequisites

  • Python version >= 3.7.
  • A Poplar SDK and appropriate framework must be installed and enabled to build or run an application that uses IPU.
  • Docker version >= 23.0 must be installed, locally to package and publish, and on the deployment target to deploy.
  • Ensurepip must be installed. On Ubuntu systems you need to install the python3-venv package using, for example, sudo apt install python3.8-venv.

Also see using IPUs

Installing SSF as a CLI from the repo

Using Pip:

pip install git+https://git@github.com/graphcore/simple-server-framework.git

Now you will be able to run gc-ssf.

Running SSF from source

To run SSF from source you need to follow these steps.

Clone the repo

First you will need to clone the repo:

git clone https://github.com/graphcore/simple-server-framework.git

Create a virtual environment

Then create a virtual environment:

python3 -m venv .ssfenv

Activate the virtual environment

You can then activate the virtual environment:

. .ssfenv/bin/activate
pip install -e simple-server-framework/

Using IPUs

If your application uses IPUs then you will need Poplar SDK for build or run.
If you already have the required version of Poplar SDK enabled in your environment then this will be used for your application.
If you don't have Poplar SDK enabled, or the version you have does not match the version required for your application, then SSF can download and enable an SDK automatically.

Using SSF from the public Docker container.

SSF is available as a container. It can be deployed on a remote target as a server (see this example. But can also be used to develop locally:

docker pull docker.io/graphcore/simple-server-framework

To use it as an interactive bash session:

docker run --rm -it --network host --entrypoint bash graphcore/simple-server-framework:latest

Alternatively, you can also execute a single SSF command by passing all arguments to the container via the environment variable SSF_OPTIONS:

docker run --rm -d --network host --env SSF_OPTIONS='--config git@github.com:graphcore/simple-server-framework.git|examples/simple/ssf_config.yaml init build run' --name simple-server-framework graphcore/simple-server-framework:latest

For IPU users: If your local system has IPUs and you want your container to access them, you may want to use gc-docker. Alternatively, just pass these additional arguments to docker run (IPUOF_VIPU_API_HOST and IPUOF_VIPU_API_PARTITION_ID should be configured properly on your system):

--ulimit memlock=-1:-1 --net=host --cap-add=IPC_LOCK --device=/dev/infiniband/ -e IPUOF_VIPU_API_HOST=$IPUOF_VIPU_API_HOST -e IPUOF_VIPU_API_PARTITION_ID=$IPUOF_VIPU_API_PARTITION_ID-8 --ipc=host