Install Label Studio
This document provides detailed instructions on how to deploy Label Studio to a Kubernetes cluster and common configuration parameters.
TOC
Downloading
Download the Label Studio installation file: label-studio.ALL.xxxx.tgz
Use the violet command to publish to the platform repository:
Deployment
Prepare Storage
Label Studio stores data in a database and requires persistent storage. The cluster needs to have CSI pre-installed or PersistentVolume pre-prepared.
Prepare Database
Label Studio supports the following databases:
- PostgreSQL: Version 13 or higher
The PostgreSQL operator provided by Data Services can be used to create a PostgreSQL cluster.
Check the access address and password in the PostgreSQL instance details in Data Services.
Prepare Redis (Optional)
Redis is not required but recommended for production environments.
Data Services can be used to create a Redis instance.
Note: Label Studio only supports accessing Redis in standalone mode.
-
Create a
Redisinstandalonemode:-
When creating the
Redisinstance, selectRedis SentinelforArchitecture. -
After setting all parameters, switch to
YAMLmode, changespec.archtostandalone, then click theCreatebutton. -
After creation, switch to the
Alauda Container Platformview and find theServicenamedrfr-<Redis instance name>-read-write, which is the access address for this Redis instance.
-
Create Application
-
Go to the
Alauda Container Platformview and select the namespace where Label Studio will be deployed. -
In the left navigation, select
Applications/Applications, then click theCreatebutton on the right page. -
In the popup dialog, select
Create from Catalog, then the page will jump to theCatalogview. -
Find
3rdparty/chart-label-studioand clickCreateto create this application. -
On the
Catalog/Create label-studioform, fill in theName(recommended aslabel-studio) andCustomconfiguration inValues, then click theCreatebutton to complete creation. TheCustomcontent will be described below. It can also be modified after creation through theUpdateapplication method.
Configuration
Users can modify the Custom Values of the Application to adjust configuration. The main configurations to focus on are as follows:
1. Configure Storage
1.1 Configure Storage Class and Storage Size
The storage class can be specified by adding the following configuration:
2. Configure Database
2.1 Configure PostgreSQL
PostgreSQL access information can be configured by setting the following fields:
2.2 Configure Redis
Redis access information can be configured by setting the following fields:
3. Configure Access Method
By default, LoadBalancer is used to provide access address
3.1 Modify Service Type
The Service type can be modified by setting the following fields:
3.2 Enable Ingress
Ingress can be configured by setting the following fields. After enabling Ingress, the Service type is usually changed to ClusterIP:
3.3 Configure OAuth2 Proxy (Optional)
If you want to configure Alauda Container Platform as OIDC Provider, configure as follows:
oauth2_proxy.oidcIssueris the platform access address plus/dexoauth2_proxy.oidcClientIDis fixed aslabel-studiooauth2_proxy.oidcClientSecretis fixed asZXhhbXBsZS1hcHAtc2VjcmV0
You also need to create an OAuth2Client resource in the global cluster to configure Label Studio's client information:
Note: The OAuth2 proxy access address can be obtained from the <Application Name>-oauth2-proxy Service, use the appropriate access method based on the Service type.
4. Configure User Management
4.1 Disable User Registration
User registration can be disabled by setting the following fields:
Access Address
1. Access via Service
Label Studio provides external access through Service. Check its Service to get the access address.
- If OAuth2 proxy is not enabled, the Service name is:
<Application Name>-ls-app - If OAuth2 proxy is enabled, the Service name is:
<Application Name>-oauth2-proxy
If the Service type is LoadBalancer and the load balancer controller in the environment has assigned an access address, please access through that address.
For LoadBalancer or NodePort service types, access is also available through node IP with its NodePort.
2. Access via Ingress
If Ingress is enabled, please access through the configured LABEL_STUDIO_HOST.
User Management
Label Studio has no default username and password. Users can complete new user registration by filling in email and password on the login page.
Note:
- Default configuration allows anyone to register new users
- All users have the same functional permissions and can access all projects
- To restrict user registration, configure the environment variable
LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true, see: 4.1 Disable User Registration