Skip to content

Instantly share code, notes, and snippets.

@randyphoa
Created November 7, 2022 19:22
Show Gist options
  • Save randyphoa/809a4b028976cac605897bf6f654ae3f to your computer and use it in GitHub Desktop.
Save randyphoa/809a4b028976cac605897bf6f654ae3f to your computer and use it in GitHub Desktop.
Deploy R Shiny app
shiny_details = wml_client.shiny.store(meta_props={wml_client.shiny.ConfigurationMetaNames.NAME: SHINY_APP_NAME}, file_path="app.R.zip")
shiny_asset_id = wml_client.shiny.get_id(shiny_details)
deployment_details = wml_client.deployments.create(
artifact_uid=shiny_asset_id,
meta_props={
wml_client.deployments.ConfigurationMetaNames.NAME: SHINY_APP_DEPLOYMENT_NAME,
wml_client.deployments.ConfigurationMetaNames.R_SHINY: {"authentication": "anyone_with_url"},
wml_client.deployments.ConfigurationMetaNames.HARDWARE_SPEC: {"name": "M", "num_nodes": 1},
},
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment