This repo contains several simple examples of DAFNI ready models, useful for training or self-paced learning.
Instructions are given in each model section, but each follows the same principal steps:
- you first make edits to the Python source code as required,
- check the docker and requirements files,
- create a docker container image and zip it up,
- then upload this to DAFNI along with the yaml file.
This is explained further in the DAFNI help pages.
Note: You must also first install Docker on your computer. The open source Docker tools allow you to 'containerise' a model ready to be run on a different computer - thus you prepare the model on your computer, then run it on DAFNI. Docker has an excellent quick start online guide which you should read too.
Examples designed to show you the basics of creating a model.
- tiny-example--hello-world-model
- Simplistic linux based model designed to be small in size, it reads one environment variable and outputs a hello message in a text file.
- simple-example--fibonacci-model
- Simple Python based model, reading in three environment variables and producing a JSON output file.
- matlab-hello-world-model
- Simple hello world example with MATLAB.
More complete examples using real world models.
- uk-climate-analysis
- A more complex example model predicting weather from UKCP09 climate projection data. Uses various visualisations to show the results.
Examples to show how to create a service model. These models are designed to communicate with other running models
- service-example
- A simple example of both a service model and a normal model communicating.
- service-example--database
- An example of a database service model and a client model communicating.