LandingLens | LandingLens on Snowflake |
---|---|
(see exceptions below) |
Item | Requirement |
---|---|
Supported Operating Systems | Linux, macOS, Windows |
Memory |
|
Supported Processors and Architecture | x86-64, ARM64 X86-64 includes, but is not limited to:
|
Internet Connection | Required to download the Docker image and model. Not required to run inference. |
-jp4
suffix.
-jp5
suffix.
run-model-id
command to launch a container with the model.
By default, the inference endpoint port is 8000. In the code snippet below, the port
flag (-p
) sets the ports for the host and the container. The port on the left is the host port, and the port on the right is the container port.
To run the run-model-id
command:
Flag | Description |
---|---|
-k , --apikey | Required. Set an API Key for your LandingLens organization. Can also set through the 'LANDING_API_KEY' environment variable.1 |
-s , --apisecret | If you’re using a “legacy” API Key and API Secret pair, set the API Secret. Can also set through the 'LANDING_API_SECRET' environment variable.1 |
-m , --model | Required. Set the Model ID of the model you want to load. To locate your Model ID, go to Locate Your Model ID. Can also set through the 'MODEL_ID' environment variable. |
-p , --port | The port number to use for communicating with the deployed model via API. Can also set through the 'PORT' environment variable.Default: 8000 . |
-e , --external | Allow external hosts to access the API. Can also set through the 'ALLOW_EXTERNAL' environment variable.If running in a container, the default is true . Otherwise, the default is false . |
-u , --upload | When you send images for inference, save those images and the predictions to the corresponding project in LandingLens. Can also set through the 'UPLOAD_RESULTS' environment variable.Default: false . |
-g , --gpus | Select the GPUs you want to use to run inference. Include a space-separated list of the GPU indices. If you select multiple GPUs, the system will balance the load between the processors. Can also set through the 'GPUS' environment variable.Default: use all GPUs available. |
-n , --name | When you deploy a model, the name of the device displays on the Deploy page in LandingLens. Use this flag to set the device name. Can also set through the 'DEVICE_NAME' environment variable.If unspecified the default is 'LE-{hostname}' . |
--help | Display more information about the command. |
--version | Display version information. |
run-model-id
command with specific Snowflake flags to launch a container with the model.
By default, the inference endpoint port is 8000. In the code snippet below, the port
flag (-p
) sets the ports for the host and the container. The port on the left is the host port, and the port on the right is the container port.
To run the run-model-id
command for :
Flag | Description |
---|---|
--use-snowflake | Required if using . Can also set through the 'USE_SNOWFLAKE' environment variable.Default: false . |
--snowflake-account | Required if using . Enter your Snowflake account locator. To learn how to get your locator, go to the Snowflake documentation. Can also set through the 'SNOWFLAKE_ACCOUNT' environment variable. |
--snowflake-user | Required if using . Enter your Snowflake username. This is the NAME property in Snowflake.Can also set through the 'SNOWFLAKE_USER' environment variable. |
--snowflake-private-key-path | Required if using . Enter the path to your RSA private key, which is used for authenticating with Snowflake. Can also set through the 'SNOWFLAKE_PRIVATE_KEY_PATH' environment variable. |
--snowflake-app-url | Required if using . Enter the fully qualified domain of your instance of . For example, the URL could be https://example.snowflakecomputing.app/ .Can also set through the 'SNOWFLAKE_APP_URL' environment variable. |
--snowflake-privatelink | Allow the use of AWS PrivateLink with Snowflake. Can also set through the 'SNOWFLAKE_USE_PRIVATELINK' environment variable.Default: false . |
-m , --model | Required. Set the Model ID of the model you want to load. To locate your Model ID, go to Locate Your Model ID. Can also set through the 'MODEL_ID' environment variable. |
-p , --port | The port number to use for communicating with the deployed model via API. Can also set through the 'PORT' environment variable.Default: 8000 . |
-e , --external | Allow external hosts to access the API. Can also set through the 'ALLOW_EXTERNAL' environment variable.If running in a container, the default is true . Otherwise, the default is false . |
-u , --upload | When you send images for inference, save those images and the predictions to the corresponding project in LandingLens. Can also set through the 'UPLOAD_RESULTS' environment variable.Default: false . |
-g , --gpus | Select the GPUs you want to use to run inference. Include a space-separated list of the GPU indices. If you select multiple GPUs, the system will balance the load between the processors. Can also set through the 'GPUS' environment variable.Default: use all GPUs available. |
-n , --name | When you deploy a model, the name of the device displays on the Deploy page in LandingLens. Use this flag to set the device name. Can also set through the 'DEVICE_NAME' environment variable.If unspecified the default is 'LE-{hostname}' . |
--help | Display more information about the command. |
--version | Display version information. |
run-local-model
command. Running the model offline is helpful if your system doesn’t have internet access or has limited bandwidth (which could make it difficult to download the image from Docker). Also, running the model offline reduces startup time, because you don’t have to wait to download the file.
When running this command, include the mount volume (-v
) flag from Docker so that it can access the file you downloaded.
Flag | Description |
---|---|
-m , --model | Required. The model bundle to load. This will be a zip file. Can also set through the 'MODEL_PATH' environment variable. |
-p , --port | The port number to use for communicating with the deployed model via API. Can also set through the 'PORT' environment variable.Default: 8000 . |
-e , --external | Allow external hosts to access the API. Can also set through the 'ALLOW_EXTERNAL' environment variable.If running in a container, the default is true . Otherwise, the default is false . |
-u , --upload | When you send images for inference, save those images and the predictions to the corresponding project in LandingLens. Can also set through the 'UPLOAD_RESULTS' environment variable.Default: false . |
-g , --gpus | Select the GPUs you want to use to run inference. Include a space-separated list of the GPU indices. If you select multiple GPUs, the system will balance the load between the processors. Can also set through the 'GPUS' environment variable.Default: use all GPUs available. |
-n , --name | When you deploy a model, the name of the device displays on the Deploy page in LandingLens. Use this flag to set the device name. Can also set through the 'DEVICE_NAME' environment variable.If unspecified the default is 'LE-{hostname}' . |
--help | Display more information about the command. |
--version | Display version information. |
localhost
instead of the IP address.
The following example shows how to run inference within an instance hosted on 192.168.1.12, port 8000. For more examples, see our Python library.
--gpus all
flag as part of the docker command. For example:
--gpus
flag and enter the indices of the GPUs you want to use as a comma-separated list. For example, in the snippet below, the deployment will use the GPUs with index 0 and index 2:
http://localhost:[port]
, where [port]
is the port you’re using to communicate with the Dockerized application.
Use the /status
, /ready
, and /live
endpoints to monitor the status when using Kubernetes or another orchestration system.
Use the /images
endpoint to run inference.
You can use these web APIs to programmatically start or monitor inference.
/status
endpoint always returns 200
.
/ready
endpoint indicates if the model is ready to receive inference calls. It returns 200
if the model is loaded. Otherwise, it returns 503
, which indicates that either the model hasn’t loaded yet or the model failed to load.
/live
endpoint returns 200
if the model is loading or loaded. Otherwise, it returns 503
, which indicates that the container is dead and should be killed by the orchestrator (such as Kubernetes).
/images
endpoint to run inference. Results are returned in JSON.
/api/v1/images
endpoint is provided for compatibility with an older version of the Docker image. It is supported, but the JSON results are formatted differently.run-local-model
command: