Snowflake
Deploy Kumo Relational NIM as a Snowpark Container Services (SPCS) service. This recipe copies a published NIM image to a Snowflake image repository and runs one model on one GPU per service instance. The service exposes the NIM HTTP API for classification and regression.
Replace each <...> placeholder with a value for your environment. Run SQL
statements with a Snowflake role that has the required privileges. Run the Bash
commands in the same terminal so that the image variables remain available.
Before you start
- A Snowflake account with SPCS available and a GPU compute pool compatible
with the selected NIM profile. Use
SHOW COMPUTE POOL INSTANCE FAMILIESto check the available instance families and their resource capacity. - A database and schema where you can create an image repository and service.
The service owner needs
USAGEon the compute pool andREADon the image repository. A public endpoint also requiresBIND SERVICE ENDPOINTon the account. See CREATE SERVICE for privileges, including access to the parent database and schema. - A Bash shell, Docker, and a configured Snowflake CLI connection.
- Access to the selected release of the Kumo Relational NIM image. Follow NGC’s authentication instructions for your account.
1. Create Snowflake resources
Use an existing GPU compute pool or create one using an available GPU instance family compatible with the model profile:
Create an image repository in an existing database and schema:
Copy repository_url from the output. It has the form
<registry-host>/<database>/<schema>/<repository>. See Snowflake’s
image repository guide
for repository privileges and URL details.
2. Pull the NIM image from NVIDIA
Set NIM_VERSION to a published Kumo Relational image tag. If the image requires
NGC authentication, log in with an NGC API key that can access it:
Use an image architecture compatible with the selected Snowflake compute pool. The packaged NIM contains its model artifacts, so it does not need to download the model at service startup. See the Kumo Relational NIM catalog for release details.
3. Push the image to Snowflake
Log Docker in to the Snowflake image registry using your configured CLI
connection. Set SNOWFLAKE_REPOSITORY_URL to the repository_url from step 1,
without a trailing slash:
Confirm that the image is available and record its tag and digest:
The Snowflake CLI registry login reference describes connection options and authentication requirements.
4. Start the service
Create a service with one instance using the inline specification below. Replace
<nim_version> with the tag you pushed in step 3. SQL
does not substitute the Bash variables from the previous steps. The image path
begins with / and omits the registry hostname.
The CPU and memory requests are starting values. Verify the selected model profile’s requirements and the compute pool’s available resources.
This specification exposes a public endpoint. For clients connecting only from
SPCS, set public: false to keep the endpoint private. A private endpoint does
not require the account privilege for binding a public service endpoint.
Check the service and its endpoint while the container starts:
Wait until the NIM container is ready. The readiness probe calls
/v1/health/ready, which becomes ready after the model loads. If startup fails,
review the container status and the
Snowflake service monitoring guidance
before retrying.
5. Access the NIM endpoint
From a Snowflake notebook using Container Runtime
For a notebook running on an SPCS compute pool, use the service’s internal DNS
name and port. Obtain dns_name from DESCRIBE SERVICE and the port from
SHOW ENDPOINTS:
In a notebook Python cell with requests installed, verify readiness and list
the available models. Replace <service_dns_name> with the returned DNS name.
The example service uses port 8000:
This route uses internal networking without a public ingress URL or token. Services with the same owner role can access each other’s endpoints. When the owner roles differ, the client service’s owner role needs the destination service role. See Snowflake’s service-to-service access rules. If access is denied, confirm the notebook’s Container Runtime identity and its grants. Warehouse Runtime notebooks use different networking; this internal DNS example applies to Container Runtime.
6. Manage the service
When the service is no longer needed, suspend it:
Resume it when needed:
NIM sessions reside in process memory and must be recreated after a restart or suspension. Keep one service instance for session-based requests unless your deployment provides routing that keeps each session on its originating instance. Suspending the service does not suspend other services or delete the compute pool and image repository. Review the compute pool’s suspension settings when the deployment is no longer in use.