FastScore can use a Github repository as a storage backend for all the model assets.
All assets are stored as plain text files in a single repository with a mandated directory structure detailed below. Every change to an asset (via CLI or API) is immediately pushed to Github repository. The integration is bi-directional with external changes to the repository (via git client or Github web interface) propagated to Model Manage.
Setup the configuration to the repository in the
db section of the
config.yaml as shown below:
db: type: git url: https://github.com/org/repo.git branch: master username: secret://git_user password: secret://git_pass
type: gittells FastScore to use Github as the storage backend.
urlpoints to the existing Github repository.
branchtells which git branch to use.
usernameis the Docker Secret storing the user name of a Github user with read/write access to repository.
passwordis the Docker Secret storing the user password.
It is best practice to obscure passwords using Docker Secrets. These secrets are defined by adding the following section to end of the docker-compose.yml file:
secrets: git_user: external: true git_pass: external: true
In addition, the secret must be injected by running the ‘docker secret create’ command. This can be automated or handled within UCP.
echo joe | docker secret create git_user - echo password | docker secret create git_pass -
Note: Only HTTPS URLs to respositories are currently supported.
All FastScore assets must be stored in the directory structure shown below:
attachments models schemas sensors streams
The integration between the system follows these rules:
models\ model1.py mymodel.R attachments\ model1\ att1.zip mylib1.tgz streams\ input1.json out.json
Here, attachments in
attachments/model1 directory belong to model
To make FastScore aware of external changes to the repository you will need to set up a Github webhook. To set up a webhook on GitHub, head over to the Settings page of your repository, and click on Webhooks & Services. After that, click on Add Webhook. Paste the publicly accessible URL of your FastScore proxy instance into Payload URL: