This function creates the docker context from either an R object in the workspace, or a file, containing such an object. The object contains the model, package dependencies, a dictionary of additional R object, needed for it to work, and the source code of files, needed to create the API. Those are stored with the log_model object, and finally
1 | createDockerContextZip(model_file_location)
|
model_file_location |
a model file, created in the first place by by using createDockerContextZip. It should contain a single R object, which is a dictionary, and which has the following fields: A key note is that the predict function should have a method for the type of model_file model_fit - a fit model object formula_obj-Optional original_df - Optional required_packages - a vector of required packages to install additional_objects- a named list of all adidtional objects to load, together with their names. plumberTemplateFileLines -a vector of strings, representing the lines of one of the R source files, needed to create the API. runnerTemplateFileLines -a vector of strings, representing the lines of the other R source file, needed to create the API. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.