feat: Labeling Frontend adaptations + Backend build and deploy + Logging improvement (#55)

* feat: Front-end data annotation page adaptation to the backend API.

* feat: Implement labeling configuration editor and enhance annotation task creation form

* feat: add python backend build and deployment; add backend configuration for Label Studio integration and improve logging setup

* refactor: remove duplicate log configuration
This commit is contained in:
Jason Wang
2025-11-05 01:55:53 +08:00
committed by GitHub
parent f3958f08d9
commit b5fe787c20
13 changed files with 190 additions and 210 deletions

View File

@@ -7,6 +7,20 @@ server {
client_max_body_size 1024M;
location /api/synthesis/ {
proxy_pass http://datamate-backend-python:18000/api/synthesis/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/annotation/ {
proxy_pass http://datamate-backend-python:18000/api/annotation/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api/ {
proxy_pass http://datamate-backend:8080/api/;
proxy_set_header Host $host;

View File

@@ -15,6 +15,22 @@ services:
depends_on:
- datamate-database
# 1) backend (Python)
datamate-backend-python:
container_name: datamate-backend-python
image: datamate-backend-python
restart: on-failure
privileged: true
environment:
- log_level=DEBUG
volumes:
- dataset_volume:/dataset
- flow_volume:/flow
- log_volume:/var/log/datamate
networks: [ datamate ]
depends_on:
- datamate-database
# 2) frontend(NodePort 30000)
datamate-frontend:
container_name: datamate-frontend
@@ -28,6 +44,7 @@ services:
networks: [ datamate ]
depends_on:
- datamate-backend
- datamate-backend-python
# 3) database
datamate-database:
@@ -47,6 +64,8 @@ services:
- ../../../scripts/db:/docker-entrypoint-initdb.d
- ./utf8.cnf:/etc/mysql/conf.d/utf8.cnf:ro
- database_log_volume:/var/log/datamate/database
ports:
- "3306:3306"
networks: [ datamate ]
# 3) runtime

View File

@@ -1,6 +1,6 @@
services:
app:
label-studio:
stdin_open: true
tty: true
image: heartexlabs/label-studio:latest
@@ -11,7 +11,7 @@ services:
ports:
- "8000:8000"
depends_on:
- db
- pg-db
environment:
- DJANGO_DB=default
- POSTGRE_NAME=postgres
@@ -23,17 +23,19 @@ services:
- LOCAL_FILES_SERVING_ENABLED=true
- LOCAL_FILES_DOCUMENT_ROOT=/label-studio/local
- USE_USERNAME_FOR_LOGIN=true
- LABEL_STUDIO_USERNAME=admin@huawei.com
- LABEL_STUDIO_PASSWORD=admin1234
- LABEL_STUDIO_USERNAME=admin@demo.com
- LABEL_STUDIO_PASSWORD=demoadmin
- LABEL_STUDIO_ENABLE_LEGACY_API_TOKEN=true
- LABEL_STUDIO_USER_TOKEN=abc123abc123
- LOG_LEVEL=INFO
- LOG_LEVEL=DEBUG
volumes:
- label-studio-data:/label-studio/data:rw
- dataset_volume:/label-studio/local:rw
networks:
- datamate
command: label-studio-uwsgi
db:
pg-db:
image: pgautoupgrade/pgautoupgrade:13-alpine
hostname: db
restart: unless-stopped
@@ -42,9 +44,16 @@ services:
- POSTGRES_USER=postgres
volumes:
- label-studio-db:/var/lib/postgresql/data
networks:
- datamate
volumes:
label-studio-data:
label-studio-db:
dataset_volume:
name: datamate-dataset-volume
name: datamate-dataset-volume
networks:
datamate:
driver: bridge
name: datamate-network