File size: 1,734 Bytes
50f5418
3e7ac46
50f5418
 
 
 
 
 
 
 
 
 
 
 
2f00b00
50f5418
 
 
 
 
3a7522e
50f5418
 
56d23c1
50f5418
56d23c1
50f5418
56d23c1
50f5418
 
 
 
 
 
65e9641
 
 
 
e5f8c3f
3e7ac46
 
0e5c8dc
 
50f5418
 
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
# FROM heartexlabs/label-studio:latest

# # HuggingFace Spaces runs on port 7860
# ENV PORT=7860

# # ── Public URL β€” must match your Space URL exactly ──────────────────────────
# ENV LABEL_STUDIO_HOST=https://bisalsaha-lebel-studio.hf.space

# # ── CSRF fix: use the EXACT env var name Label Studio reads ─────────────────
# # Comma-separated, no spaces
# ENV CSRF_TRUSTED_ORIGINS=https://bisalsaha-lebel-studio.hf.space,https://*.hf.space

# # ── Tell Django it's behind an HTTPS reverse proxy ──────────────────────────
# ENV SECURE_PROXY_SSL_HEADER=HTTP_X_FORWARDED_PROTO,https

# # ── Cookie settings for cross-origin HTTPS (HF proxy requires this) ─────────
# ENV SESSION_COOKIE_SECURE=1
# ENV CSRF_COOKIE_SECURE=1
# ENV SESSION_COOKIE_SAMESITE=None
# ENV CSRF_COOKIE_SAMESITE=None

# # ── Allow signup (set to true to lock down later) ────────────────────────────
# ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=false

# EXPOSE 7860

# CMD ["label-studio", "--port", "7860"]

FROM heartexlabs/label-studio:latest

ENV LABEL_STUDIO_HOST=https://bisalsaha-studioserver.hf.space
ENV PORT=7860
ENV DATA_UPLOAD_MAX_MEMORY_SIZE=524288000
ENV LABEL_STUDIO_LOCAL_FILES_SERVING_ENABLED=true
ENV CSRF_TRUSTED_ORIGINS=https://bisalsaha-studioserver.hf.space
ENV DJANGO_ALLOWED_HOSTS=bisalsaha-studioserver.hf.space
ENV USE_X_FORWARDED_HOST=true
ENV USE_X_FORWARDED_PORT=true

EXPOSE 7860

CMD ["label-studio", "start", \
     "--port", "7860", \
     "--host", "0.0.0.0", \
     "--log-level", "WARNING"]