Creating a node
You can deploy an individual notebook cell or a third-party Docker image as a standalone service using nodes.
Warning
When deploying and using models, you pay for the uptime of each node instance: from its start to deletion.
If you no longer need the service you deployed, delete the node.
If your project uses packages and libraries that are not included in the list of pre-installed software, first configure your node environment using a Docker image.
Node from a model
-
Select the project in your community or on the DataSphere home page
in the Recent projects tab. -
In the top-right corner, click Create resource. In the pop-up window, select Node.
-
Enter a name for the node in the Name field.
-
Under Type, specify the resource type: Model.
-
In the Models field, select the saved model and specify the inputs, if required.
Note
When deploying PyTorch models, DataSphere cannot automatically infer the input and output parameters.
If you are setting the inputs, make sure to specify the outputs as well. When you set the inputs manually for any model type, DataSphere cannot automatically infer the outputs.
For XGBoost and LightGBM models, the names and types of input and output parameters remain unchanged:
- Input parameters:
input__0of theTYPE_FP32type, vector with the [N] length. For example, if N=32, specify[32]in the Tensor dimension field. - Output parameters:
output__0of theTYPE_FP32type, scalar value. In the Tensor dimension field, specify[1].
Tip
To create a node from XGBoost and LightGBM models saved in DataSphere before April 8, 2024, re-save them to the model resource.
- Input parameters:
-
Under Folder, select the folder for the new resources.
-
Under Provisioning, select the configuration of instance computing resources, availability zone, and the ID of the subnet to host the instance.
-
In the Maintenance limit field, specify the maximum number of node instances that can be shut down for maintenance at the same time.
-
Under Access control list (ACL), click
Add ACL and specify the IDs of the folders allowed to connect to the node. The folder ID of the user creating the node is specified by default. -
Click Create.
To view all created nodes:
-
Select the project in your community or on the DataSphere home page
in the Recent projects tab. - Under Project resources, select Node.
Node from a Docker image
-
Select the project in your community or on the DataSphere home page
in the Recent projects tab. -
In the top-right corner, click Create resource. In the pop-up window, select Node.
-
Enter a name for the node in the Name field.
-
Optionally, in the Description field, enter a description for the node.
-
Under Type, select the resource to base your node on: Docker.
-
Under Docker image storage, select the container registry. You can select Container Registry or any other registry. For Container Registry, specify:
- Docker image in the following format:
cr.yandex/<registry_ID>/<image_ID>:<tag>. - Username will automatically get the
json_keyvalue. - Password secret: In the project settings, select the secret containing the file with the authorized key for the service account from the list.
To use an image from another Docker image storage, select the Other type and fill the remaining fields with the values required for connection to your registry.
- Docker image in the following format:
-
Optionally, under Docker image settings, set the disk size available in the Docker image.
-
Under Endpoint:
- Type: Select a node connection protocol, HTTP (HTTP/2) or gRPC.
- Port: Specify the port for connecting to the node.
- Timeout: Set the session timeout, in seconds.
- Idle timeout: Set the idle time before disconnecting from the node, in seconds.
-
Optionally, under Telemetry:
- Type: Select the telemetry service, Prometheus or Yandex Monitoring.
- HTTP path: Specify the address to send telemetry data to.
- Port: Specify the port to send telemetry data to.
-
Optionally, under Healthcheck:
- Type: Node health check protocol, HTTP or gRPC.
- Port: Port used for node health checks.
- Path: Path to the resource to check.
- Timeout: Check duration, in seconds.
- Interval: Interval between checks, in seconds.
- Fails threshold: Allowed number of failed checks.
- Passes threshold: Required number of successful checks.
-
Optionally, under Docker image settings, set the total memory available in the Docker image.
-
Under Folder, select the folder for the new resources.
-
Under Provisioning:
- Instance configuration: Select a configuration of the instance computing resources.
- Distribution by zones: Add an availability zone and the ID of the subnet to host the instance.
- Maintenance limit: Specify the maximum number of node instances that can be shut down for maintenance at the same time.
- Additional disk: Optionally, add a secondary disk for the instance. If you selected multiple instances, a disk will be created for each one.
-
Under Access control list (ACL), click
Add ACL and specify the IDs of the folders allowed to connect to the node. The folder ID of the user creating the node is specified by default. -
Click Create.
To view all created nodes:
-
Select the project in your community or on the DataSphere home page
in the Recent projects tab. - Under Project resources, select Node.