Spaces:
Sleeping
Sleeping
Chris Hoge
commited on
Commit
·
37ff17e
1
Parent(s):
41a9365
Add a Dockerfile to launch the Label Studio Space
Browse filesAdded the initial Dockerfile to launch the Label Studio Space,
with instructions on how to enable advanced user management and
persistent storage.
- Dockerfile +63 -0
Dockerfile
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM heartexlabs/label-studio:hf-latest
|
| 2 |
+
|
| 3 |
+
################################################################################
|
| 4 |
+
#
|
| 5 |
+
# How to Disable Public Account Creation
|
| 6 |
+
# --------------------------------------
|
| 7 |
+
# By default this space allows for the unrestricted creation of new accounts
|
| 8 |
+
# will full access to all projects and data. This is great for trying out
|
| 9 |
+
# Label Studio and collaborating on projects, but you may want to restrict
|
| 10 |
+
# access to your space to only authorized users. Uncomment the following line
|
| 11 |
+
# to diable public account creation for this space.
|
| 12 |
+
#
|
| 13 |
+
# ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true
|
| 14 |
+
#
|
| 15 |
+
# Set secrets in your space to create an inital user, and log in with your
|
| 16 |
+
# provided username and password. Do not set these in your Dockerfile, as they
|
| 17 |
+
# globall visible on a public space.
|
| 18 |
+
#
|
| 19 |
+
# LABEL_STUDIO_USERNAME
|
| 20 |
+
# LABEL_STUDIO_PASSWORD
|
| 21 |
+
#
|
| 22 |
+
# You will need to provide new users with an invitation link to join the space.
|
| 23 |
+
#
|
| 24 |
+
################################################################################
|
| 25 |
+
|
| 26 |
+
################################################################################
|
| 27 |
+
#
|
| 28 |
+
# How to Enable Configuration Persistence
|
| 29 |
+
# ---------------------------------------
|
| 30 |
+
# By default this space stores all project configuration and data annotations
|
| 31 |
+
# in local storage with Sqlite. If the space is reset, all configuration and
|
| 32 |
+
# annotation data in the space will be lost. You can enable configuration
|
| 33 |
+
# persistence by connecting an external Postgres database to your space,
|
| 34 |
+
# guaranteeing that all project and annotation settings are preserved.
|
| 35 |
+
#
|
| 36 |
+
# Set the following secret variables to match your own hosted instance of
|
| 37 |
+
# Postgres. We strongly recommend setting these as secrets to prevent leaking
|
| 38 |
+
# information about your database service to the public in your spaces
|
| 39 |
+
# definition.
|
| 40 |
+
#
|
| 41 |
+
# ENV DJANGO_DB=default
|
| 42 |
+
# ENV POSTGRE_NAME=<postgres_name>
|
| 43 |
+
# ENV POSTGRE_PORT=<db_port>
|
| 44 |
+
# ENV POSTGRE_USER=<postgres_user>
|
| 45 |
+
# ENV POSTGRE_PASSWORD=<password>
|
| 46 |
+
# ENV POSTGRE_PORT=<db_port>
|
| 47 |
+
# ENV POSTGRE_HOST=<db_host>
|
| 48 |
+
#
|
| 49 |
+
# Uncomment the following line to remove the warning about ephemeral storage
|
| 50 |
+
#
|
| 51 |
+
# ENV STORAGE_PERSISTENCE=1
|
| 52 |
+
#
|
| 53 |
+
# Note that you will need to connect cloud storage to host data items that you
|
| 54 |
+
# want to annotate, as local storage will not be preserved across a space reset.
|
| 55 |
+
#
|
| 56 |
+
################################################################################
|
| 57 |
+
|
| 58 |
+
# Wrap Label Studio to set the space hostname and pass through arguments
|
| 59 |
+
RUN echo "export LABEL_STUDIO_HOST=\$SPACE_HOST; echo 'starting label studio'; label-studio \$@" > start.sh
|
| 60 |
+
RUN chmod +x /label-studio/start.sh
|
| 61 |
+
|
| 62 |
+
# Start Label Studio in the Hugging Face Space on port 7860
|
| 63 |
+
CMD ["/label-studio/start.sh", "-p", "7860"]
|