Sign inSign up

heartexlab/label-studio

By heartexlab

•Updated 5 months ago

Label Studio is a multi-type data labeling and annotation tool with a standardized output format

Image
Machine learning & AI
Data science
0

2.6K

heartexlab/label-studio repository overview

⁠label-studio

A custom Docker base image extending heartexlabs/label-studio⁠ with a pre-configured entrypoint and automatic template initialization script.

Copyright Notice This image is built on top of the official Label Studio Docker image by Heartex Labs. Base image: heartexlabs/label-studio⁠ Label Studio is licensed under the Apache 2.0 License⁠.


⁠Overview

This image serves as a reusable base for Label Studio deployments. It adds:

  • A custom entrypoint.sh wrapper
  • An init_template.sh script that auto-seeds a template project on first startup

Child images extend this base to inject project-specific annotation templates.


⁠Directory Structure

label-studio/
├── Dockerfile          # Builds the base image
├── entrypoint.sh       # Wrapper: runs init_template.sh in background, then starts Label Studio
├── init_template.sh    # Seeds a template project via Django ORM on first startup
├── requirements.txt    # Extra Python dependencies to install into the Label Studio venv
└── template/           # (Optional) custom annotation templates — handled by child images

⁠How It Works

⁠entrypoint.sh

Wraps the default Label Studio startup:

  1. Starts init_template.sh in the background
  2. Calls exec label-studio — Label Studio becomes PID 1 (handles signals correctly)
⁠init_template.sh

Runs after Label Studio is healthy:

  1. Waits for the /health endpoint to return UP
  2. Uses Django ORM directly to create a template project if one doesn't already exist
  3. Idempotent — safe to run on every container restart

⁠Build

docker build -t label-studio .

⁠Usage with Docker Compose

services:
  label-studio:
    build:
      context: ./label-studio
      dockerfile: Dockerfile
    image: label-studio:latest
    ports:
      - "8080:8080"
    volumes:
      - label_studio_data:/label-studio/data

volumes:
  label_studio_data:

⁠Environment Variables

VariableDefaultDescription
LABEL_STUDIO_URLhttp://localhost:8080Internal URL used by init_template.sh to check health
LABEL_STUDIO_USERNAMEai-engineer@localhostDefault admin user email
LABEL_STUDIO_PASSWORDchangemeDefault admin user password
LABEL_STUDIO_HOSThttp://localhost:8080Public host URL shown in Label Studio UI

Tag summary

Content type

Image

Digest

sha256:097045d34…

Size

361.3 MB

Last updated

5 months ago

docker pull heartexlab/label-studio