Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +10 -99
Dockerfile
CHANGED
@@ -1,99 +1,10 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
#
|
6 |
-
|
7 |
-
#
|
8 |
-
|
9 |
-
#
|
10 |
-
|
11 |
-
# to disable 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 |
-
# globally 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 |
-
################################################################################
|
59 |
-
#
|
60 |
-
# How to Enable Cloud Storage
|
61 |
-
# ---------------------------
|
62 |
-
# By default the only data storage enabled for this space is local. In the case
|
63 |
-
# of a space reset, all data will be lost. To enable permanent storage, you
|
64 |
-
# must enable a cloud storage connector. We also strongly recommend enabling
|
65 |
-
# configuration persistence to preserve project data, annotations, and user
|
66 |
-
# settings. Choose the appropriate cloud connector and configure the secrets
|
67 |
-
# for it.
|
68 |
-
#
|
69 |
-
# Amazon S3
|
70 |
-
# =========
|
71 |
-
# STORAGE_TYPE=s3
|
72 |
-
# STORAGE_AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"
|
73 |
-
# STORAGE_AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"
|
74 |
-
# STORAGE_AWS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
|
75 |
-
# STORAGE_AWS_REGION_NAME="<YOUR_BUCKET_REGION>"
|
76 |
-
# STORAGE_AWS_FOLDER=""
|
77 |
-
#
|
78 |
-
# Google Cloud Storage
|
79 |
-
# ====================
|
80 |
-
#
|
81 |
-
# STORAGE_TYPE=gcs
|
82 |
-
# STORAGE_GCS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
|
83 |
-
# STORAGE_GCS_PROJECT_ID="<YOUR_PROJECT_ID>"
|
84 |
-
# STORAGE_GCS_FOLDER=""
|
85 |
-
# GOOGLE_APPLICATION_CREDENTIALS="/opt/heartex/secrets/key.json"
|
86 |
-
#
|
87 |
-
# Azure Blob Storage
|
88 |
-
# ==================
|
89 |
-
#
|
90 |
-
# STORAGE_TYPE=azure
|
91 |
-
# STORAGE_AZURE_ACCOUNT_NAME="<YOUR_STORAGE_ACCOUNT>"
|
92 |
-
# STORAGE_AZURE_ACCOUNT_KEY="<YOUR_STORAGE_KEY>"
|
93 |
-
# STORAGE_AZURE_CONTAINER_NAME="<YOUR_CONTAINER_NAME>"
|
94 |
-
# STORAGE_AZURE_FOLDER=""
|
95 |
-
#
|
96 |
-
#
|
97 |
-
################################################################################
|
98 |
-
|
99 |
-
CMD exec label-studio --host=$SPACE_HOST
|
|
|
1 |
+
git clone https://github.com/heartexlabs/label-studio.git
|
2 |
+
cd label-studio
|
3 |
+
# Install all package dependencies
|
4 |
+
pip install -e .
|
5 |
+
# Run database migrations
|
6 |
+
python label_studio/manage.py migrate
|
7 |
+
# Collect static files
|
8 |
+
python label_studio/manage.py collectstatic
|
9 |
+
# Start the server in development mode at http://localhost:8080
|
10 |
+
python label_studio/manage.py runserver
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|