R package to forecast TB notifications, incidence, mortality, and prevalence
While not public, the easiest approach is to clone the repository, and then use:
devtools::install('fort')
assuming the working directory is one level up from the repository clone.
A plumber API is now defined in inst/plumber.
This can be run using:
library(plumber)
root <- plumb_api(package='fort',name='tbstatisticalserver')
pr_run(root)
The server can be tested using the json data in the same folder:
curl -X "POST" "http://127.0.0.1:8021/projection" -H 'Content-Type: application/json' -d @projection.json
fort can be packaged as a Docker image. The relevant files are in the /docker
folder.
The files are cloned (indirectly) from the GitHub repo, for historial reasons.
To build the Docker image, use:
docker build -t fort .
To (optionally) push to the Docker image to the Avenir Health container registry (permissions required), use:
docker tag fort swtoolscr.azurecr.io/tbstatisticalserver:beta
docker push swtoolscr.azurecr.io/tbstatisticalserver:beta
To launch a Docker container from the image, use:
docker run -d -p 8080:8080 --name fort fort