A Valve powered vetiver Dockerfile will run prediction endpoints concurrently.
Usage
valve_write_vetiver(
vetiver_model,
plumber_file = "plumber.R",
path = ".",
port = 8000,
vetiver_args = list(),
workers = NULL,
n_max = NULL,
check_unused = NULL,
max_age = NULL
)
Arguments
- vetiver_model
A deployable
vetiver_model()
object- plumber_file
A path for your Plumber file, created via
vetiver_write_plumber()
. Defaults toplumber.R
in the working directory.- path
A path to write the Dockerfile and
lockfile
, capturing the model's package dependencies. Defaults to the working directory.- port
The server port for listening: a number such as 8080 or an expression like
'as.numeric(Sys.getenv("PORT"))'
when the port is injected as an environment variable.- vetiver_args
additional arguments passed to
vetiver::vetiver_write_docker()
as key-value pairs in a list object.
Details
This function is a modification of vetiver::vetiver_write_docker()
. It
modifies the created Dockerfile to install Valve, changes the ENTRYPOINT
to
use the Valve executable instead of a single plumber API via an R command.