CoolFace
Apppublic

phmei96/user_annotation_2

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes
Dockerfile138 linesDownload Raw Back to root
1FROM heartexlabs/label-studio:hf-latest2 3################################################################################4#5# How to Disable Public Account Creation6# --------------------------------------7# By default this space allows for the unrestricted creation of new accounts8# will full access to all projects and data. This is great for trying out9# Label Studio and collaborating on projects, but you may want to restrict10# access to your space to only authorized users. Uncomment the following line11# to disable public account creation for this space.12#13ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true14 15#16# Set secrets in your space to create an inital user, and log in with your17# provided username and password. Do not set these in your Dockerfile, as they18# globally visible on a public space.19#20#LABEL_STUDIO_USERNAME21#LABEL_STUDIO_PASSWORD22#23# You will need to provide new users with an invitation link to join the space.24#25################################################################################26 27################################################################################28#29# How to Enable Persistent Storage for Label Studio in Hugging Face Spaces30# ------------------------------------------------------------------------31#32# By default this space stores all project configuration and data annotations33# in local storage with sqlite. If the space is reset, all configuration and34# annotation data in the space will be lost. You can enable configuration35# persistence through one of two methods:36#37# 1) Enabling Hugging Face Persistent Storage for saving project and annotation38#    settings, as well as local task storage.39# 2) Connecting an external Postgres database for saving project and annotation40#    settings, and cloud by connecting cloud storage for tasks.41#42################################################################################43 44################################################################################45#46# How to Enable Hugging Face Persistent Storage for Label Studio47# --------------------------------------------------------------48#49# In the Hugging Face Label Studio Space settings, select the appropriate50# Persistent Storage tier. Note that Persistent Storage is a paid add-on.51# By default, persistent storage is mounted to /data. In your Space settings,52# set the following variables:53#54#LABEL_STUDIO_BASE_DATA_DIR=/data55ENV STORAGE_PERSISTENCE=156#57# Your space will restart. NOTE: if you have existing settings and data,58# they will be lost in this first restart. Data and setting will only be59# preserved on subsequent restarts of the space.60#61################################################################################62 63################################################################################64#65# How to Enable Configuration Persistence with Postgres66# -----------------------------------------------------67#68# Set the following secret variables to match your own hosted instance of69# Postgres. We strongly recommend setting these as secrets to prevent leaking70# information about your database service to the public in your spaces71# definition.72#73# ENV DJANGO_DB=default74# ENV POSTGRE_NAME=<postgres_name>75# ENV POSTGRE_PORT=<db_port>76# ENV POSTGRE_USER=<postgres_user>77# ENV POSTGRE_PASSWORD=<password>78# ENV POSTGRE_PORT=<db_port>79# ENV POSTGRE_HOST=<db_host>80#81# Uncomment the following line or set the following Space variable to remove82# the warning about ephemeral storage83#84# ENV STORAGE_PERSISTENCE=185#86# Note that you will need to connect cloud storage to host data items that you87# want to annotate, as local storage will not be preserved across a space reset.88#89#90# How to Enable Cloud Storage91# ---------------------------92# By default the only data storage enabled for this space is local. In the case93# of a space reset, all data will be lost. To enable permanent storage, you94# must enable a cloud storage connector. We also strongly recommend enabling95# configuration persistence to preserve project data, annotations, and user96# settings. Choose the appropriate cloud connector and configure the secrets97# for it.98#99# Amazon S3100# =========101# STORAGE_TYPE=s3102# STORAGE_AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"103# STORAGE_AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"104# STORAGE_AWS_BUCKET_NAME="<YOUR_BUCKET_NAME>"105# STORAGE_AWS_REGION_NAME="<YOUR_BUCKET_REGION>"106# STORAGE_AWS_FOLDER=""107#108# Google Cloud Storage109# ====================110#111# STORAGE_TYPE=gcs112# STORAGE_GCS_BUCKET_NAME="<YOUR_BUCKET_NAME>"113# STORAGE_GCS_PROJECT_ID="<YOUR_PROJECT_ID>"114# STORAGE_GCS_FOLDER=""115# GOOGLE_APPLICATION_CREDENTIALS="/opt/heartex/secrets/key.json"116#117# Azure Blob Storage118# ==================119#120# STORAGE_TYPE=azure121# STORAGE_AZURE_ACCOUNT_NAME="<YOUR_STORAGE_ACCOUNT>"122# STORAGE_AZURE_ACCOUNT_KEY="<YOUR_STORAGE_KEY>"123# STORAGE_AZURE_CONTAINER_NAME="<YOUR_CONTAINER_NAME>"124# STORAGE_AZURE_FOLDER=""125#126################################################################################127#RUN mkdir -p /label-studio/data/media && chmod -R 777 /label-studio/data128#CMD chmod -R 777 /data129#CMD sh -c 'exec label-studio --host="$SPACE_HOST" --data-dir /data'130# only las CMD is used131#CMD exec label-studio --host=$SPACE_HOST132 133RUN mkdir -p /label-studio/data/media134 135USER 1000136 137CMD sh -c 'exec label-studio --host="$SPACE_HOST" --data-dir /data'138