FROM heartexlabs/label-studio:hf-latest USER root RUN pip install --no-cache-dir boto3 COPY scripts/entrypoint.sh /entrypoint.sh COPY scripts/sync_label_studio_r2.py /app/scripts/sync_label_studio_r2.py COPY scripts/r2_storage.py /app/scripts/r2_storage.py COPY config/label_studio.xml /app/config/label_studio.xml RUN chmod +x /entrypoint.sh \ && mkdir -p /label-studio/data /label-studio/logs /app/scripts /app/config ENV LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data \ LABEL_STUDIO_LOG_DIR=/label-studio/logs \ STORAGE_PERSISTENCE=1 \ PYTHONPATH=/app/scripts \ R2_SYNC_ON_START=1 \ R2_SYNC_ON_STOP=1 \ R2_SYNC_INTERVAL_SEC=300 # HF Space: restrict signup; use the same login as your local instance ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true ENTRYPOINT ["/entrypoint.sh"]