Bogdan Teleuca and Mike Goddard have posted extensively about publishing SAS models and decisions to container destinations, particularly on Microsoft Azure. Here, I’m going to illustrate how to use the Private Docker publishing destination to publish a SAS decision—the same applies to a SAS model—and then run it using SAS Container Runtime (or SCR), in a completely cloud-provider-agnostic environment.
The ultimate goal is to run a SAS model or SAS decision against input data in the most lightweight way possible, independently of SAS Viya.
That’s where SAS Container Runtime (SCR) comes into play. It provides a lightweight runtime environment for executing SAS models and decisions packaged as container images.
Note: SAS Container Runtime is used for SAS models and decisions. Python and R models use a different type of container, but the overall principles are similar. Since the focus of this example is on SAS assets, we’ll concentrate on SAS Container Runtime.
In our environment, which does not rely on Azure or any other specific cloud provider, we have:
The following diagram illustrates the different components and the overall workflow.
Select any image to see a larger version.
Mobile users: To view the images, select the "Full" version at the bottom of the page.
The workflow illustrated above can be broken down into four main steps:
We won’t cover that last scenario here, as it involves additional deployment considerations.
However, the course SAS® Container Runtime: Architecture and Deployment on Azure Cloud illustrates what is required to deploy and run these models and decisions in Kubernetes on Microsoft Azure. While Azure-specific, many of the underlying concepts apply to other Kubernetes environments as well.
For this example, we’ll focus primarily on the lightweight approach: publishing our SAS decision as a container image and running that image directly using a container runtime.
Now that we’ve set the scene, let’s identify the information we need to complete the process.
For the Private Docker publishing destination, we need:
For the optional Publishing Validation step, we also need access to a Kubernetes cluster:
The Kubernetes key and certificate are usually found in the kubeconfig file and can be provided by a Kubernetes administrator. Make sure to use a key and certificate with an appropriate scope (for example, permissions to deploy containers) on your cluster.
We now have everything we need: we understand the architecture and workflow, and we have gathered the credentials and configuration details required to put it into practice.
In Part 2, we’ll move from theory to practice and walk through the steps required to configure the publishing destination, publish the SAS decision, and run it using SAS Container Runtime.
A big thank you to Adam Bullock for his help and insights on this topic.
Thanks for reading!
Find more articles from SAS Global Enablement and Learning here.
Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.
The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.