File size: 1,420 Bytes
cd3ce82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2502617
cd3ce82
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
version: "3.11"

services:
  grounding_sam:
    container_name: grounding_sam
    image: heartexlabs/label-studio-ml-backend:grounding_sam-master
    build:
      context: .
      args:
        TEST_ENV: ${TEST_ENV}
# Increase the memory limit if you USE_SAM=true on CPU machine
#    deploy:
#      resources:
#        reservations:
#          memory: 16G
    environment:
      - MODEL_DIR=/data/models
      - WORKERS=2
      - THREADS=4
      - LOG_LEVEL=DEBUG

      # Add these variables if you want to access the images stored in Label Studio
      - LABEL_STUDIO_HOST=
      - LABEL_STUDIO_ACCESS_TOKEN=

      # use these if you want to use segment anything instead of bounding box predictions from input text prompts
      - USE_SAM=false  # if you want to automatically generate segment anything model predictions
      - USE_MOBILE_SAM=false # whether you want to use a more efficient, yet a bit less accurate, version of the segment anything model

      - BOX_THRESHOLD=0.30
      - TEXT_THRESHOLD=0.25
# # Uncomment the following lines if you want to use GPU
#      - NVIDIA_VISIBLE_DEVICES=all
#    deploy:
#      resources:
#        reservations:
#          devices:
#            - driver: nvidia
#              count: 1
#              capabilities: [gpu]
    ports:
      - "7860:7860"
    volumes:
      - "./data/ml-backend:/data"
      - "./prompt.txt:/app/prompt.txt"
      - ./dino.py:/app/dino.py