Learn how to bring your SAS projects to Domino to unify your data science teams and provide all the benefits of the Domino platform to SAS users. Domino supports SAS Analytics Pro, SAS Analytics Pro - Advanced Programming, SAS Analytics for Containers, and SAS Data Science programming-only, with support for Viya and SAS platforms.
To use a SAS Workspace, your administrator must configure the Compute Environment and Workspace for you. Once configured, you can switch your Project to the SAS-enabled Environment. With containerization, multiple SAS users can work on the same SAS code using separate Workspaces.
Contact your Domino representative for more information about configuring SAS Workspaces on Domino.
This section provides an overview of the setup process for SAS Analytics Pro on Domino (including Advanced Programming). Contact your Domino representative to learn more.
-
When you receive your license from SAS, you’ll receive a credential token to access the SAS container repository. Use the token to pull the base image for SAS Analytics Pro onto your local machine.
-
Use a Dockerfile, provided by your Domino representative, to build a Domino-compatible image.
-
Include your SAS license file,
license.jwt
, in the same location as the Dockerfile when building the Docker image.The license file will be copied into the container and the SAS license utility will run to license the software.
-
Push your newly created Docker image to a repository that your Domino deployment can access.
This may be a repository hosted by your organization or a private repository within the Domino cluster.
-
Once you have created the Docker image, create a new Domino Environment using the custom image path.
-
Add the pluggable properties provided by your Domino representative, and make sure the “start:” parameter points to the start script created in the Dockerfile
/opt/domino/workspaces/sas/start
. -
After building the Environment in Domino, you will be able to select it in the Workspace launch menu when starting a new Workspace in your Project.
Learn how to build SAS as a container. The following instructions are similar to the official SAS instructions for containerization, but with a few key differences specific to Domino. To learn about the benefits of running SAS as a container, see SAS: Build and run a container.
In this guide, you learn how to:
-
Get your SAS license.
-
Create a TAR file of SAS Studio.
-
Create a Docker image that includes:
-
SAS Studio TAR file.
-
Dockerfile with instructions to build the Docker image.
-
Start script provided by Domino.
-
-
Use the Docker image to create pluggable Workspaces in Domino.
-
Optional: Persist SAS preferences and add-ons.
To use a SAS Workspace in Domino, you must have a valid SAS license file.
-
Go to
my.sas.com
to download the license file. -
Save the license file securely, you will use the license file to build the SAS Docker image later.
Bundle SAS Studio in a TAR file to run in your Docker container.
-
Run the SAS Deployment Wizard to install SAS Studio on a Linux machine with the same version and distribution as the Domino Compute Environment that you want to run the SAS container on.
-
During the installation, change the default location for the SAS Studio installation to
/usr/local/SASHome
. -
Manually create a TAR file of SAS Studio that includes the
SASHome
directory.
tar — cvf SASHomeTar.tar /usr/local/SASHome
Ensure that your Dockerfile includes a command to download and apply the valid SAS license file.
The license file must be hosted on a server accessible through an HTTP request from the Domino cluster. When building the Environment image, this file must be available to the build host without authentication restrictions.
Enter the following command in your Dockerfile Instructions:
RUN apply-license <url_to_license_file>
Base64 example
ENV SAS_LICENSE=”UgbWFnbmEgYWx...pcXVhLgo=”
RUN apply-license $SAS_LICENSE
Project file example
In your Pre Run Script:
apply-license /mnt/my-sas-license.jwt
Create a start script in your Docker image to start SAS Studio.
The following start script is a basic example, reach out to your Domino representative for guidance on creating a start script to suit your specific needs.
#!/usr/bin/env bash
set -o errexit -o pipefail
# Update SAS Settings to start in Domino Project directory
sed -i "s#webdms.customPathRoot=#webdms.customPathRoot=$DOMINO_WORKING_DIR#g"
/usr/local/SASHome/SASStudioBasic/3.8/war/config/config.properties
# Set the prefix path to the SAS web service
PREFIX_PATH="${DOMINO_PROJECT_OWNER}/${DOMINO_PROJECT_NAME}/notebookSession/${DOMINO_RUN_ID}"
PREFIX_FILE="${DOMINO_PROJECT_OWNER}#${DOMINO_PROJECT_NAME}#notebookSession#${DOMINO_RUN_ID}"
sed -i "s#path="/SASStudio"#path="/${PREFIX_PATH}"#g" /usr/local/SASHome/sas/appserver/studio/conf/Catalina/localhost/SASStudio.xml
mv /usr/local/SASHome/sas/appserver/studio/conf/Catalina/localhost/SASStudio.xml
"/usr/local/SASHome/sas/appserver/studio/conf/Catalina/localhost/${PREFIX_FILE}#SASStudio.xml"
# Start SAS Studio and keep the container alive while it runs
sudo -E bash -c "/usr/local/SASHome/sas/sasstudio.sh start && while true ; do :; sleep 60 ; done"
Create the Docker image in a repository that Domino can access that includes the following:
-
SAS Studio TAR file
-
Domino-provided start script
-
Dockerfile with instructions
Paste the following code into Pluggable Workspace Tools to enable the SAS workspace.
sas:
title: "SAS"
iconUrl: "https://upload.wikimedia.org/wikipedia/commons/1/10/SAS_logo_horiz.svg"
start: [ "/opt/domino/workspaces/sas/start" ]
httpProxy:
internalPath: "/{{ownerUsername}}/{{projectName}}/{{sessionPathComponent}}/{{runId}}/SASStudio/"
port: 8888
rewrite: false
requireSubdomain: false
To persist your SAS Studio preferences between Domino sessions, you can define a Post Run Script to automatically copy them to your Project Files when you Stop and Sync a session, and define a Pre Run Script to copy them from your Project Files into locations that SAS Studio recognizes at the start of subsequent sessions.
-
Add the following lines in the Pre Run Script.
# Copy preferences to Workspace PREFS_DIR="$DOMINO_WORKING_DIR/.sasstudio5" mkdir -p $PREFS_DIR rsync -rpq $PREFS_DIR $HOME
-
Add the following lines in the Post Run Script.
# Copy preferences from Workspace PREFS_DIR="$HOME/.sasstudio5" mkdir -p $PREFS_DIR rsync -rpq $PREFS_DIR $DOMINO_WORKING_DIR
These scripts save add-ons per Project, so collaborators launching a Workspace in the same Project will have the same add-ons. However, the scripts save preferences per user in the Project so that each user can have a different set of preferences.
To run SAS Data Science Programming 3.5 on Domino, contact your Domino representative to learn more. The following steps provide an overview of the process:
-
Build the SAS Data Science Programming 3.5 container using the SAS container recipes repository. The Dockerfile expects a centos7 base image with the SAS 3.5 components installed (CAS, SAS Studio, Base SAS, etc.).
-
The SAS license file,
license.jwt
, will need to be in the same location as the Dockerfile when building the Docker image.The license file will be copied into the container and the SAS license utility will run to license the software.
-
Push your newly created Docker image to a repository that your Domino deployment can access.
This may be a repository hosted by your organization or a private repository within the Domino cluster.
-
Once you have created the Docker image, create a new Domino Environment using the custom image path.
-
Add the pluggable properties provided by your Domino representative, and make sure the “start:” parameter points to the start script created in the Dockerfile
/opt/domino/workspaces/sas/start
. -
After building the Environment in Domino, you will be able to select it in the Workspace launch menu when starting a new Workspace in your Project.