studioserver / Dockerfile
bisalsaha's picture
Update Dockerfile
65e9641 verified
Raw History Blame Contribute Delete
1.73 kB
# 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"]