Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation for Development #2

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,22 @@ pip install label-studio
```

### Install for local development
#### For MacM1 local development (otherwise skip down to the `pip install -e .` step:
```bash
# To address psycopg2-binary installation issues
brew install postgresql
brew install openssl
brew link openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

# To address grcio installation issues
brew install gcc
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
```

###
You can run the latest Label Studio version locally without installing the package with pip.

```bash
Expand All @@ -98,6 +113,8 @@ python label_studio/manage.py migrate
python label_studio/manage.py runserver
```



### Deploy in a cloud instance

You can deploy Label Studio with one click in Heroku, Microsoft Azure, or Google Cloud Platform:
Expand Down
106 changes: 53 additions & 53 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
version: "3.3"

services:
nginx:
image: nginx:1.21
ports:
- "8080:80"
- "8081:443"
depends_on:
- app
environment:
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
- NGINX_FILE=${NGINX_FILE:-default.conf}
# Optional: Specify SSL termination certificate & key
# Just drop your cert.pem and cert.key into folder 'deploy/nginx/certs'
# - NGINX_SSL_CERT=/certs/cert.pem
# - NGINX_SSL_CERT_KEY=/certs/cert.key
volumes:
# keep in sync with deploy/docker-entrypoint.d/30-copy-static-data.sh
- source: static
target: /label-studio/label_studio
type: volume
volume:
nocopy: true
- ./mydata:/label-studio/data:rw
- ./deploy/nginx/${NGINX_FILE:-default.conf}:/etc/nginx/templates/${NGINX_FILE:-default.conf}.template
- ./deploy/nginx/scripts:/docker-entrypoint.d/label-studio
- ./deploy/nginx/certs:/certs:ro
command: nginx -g "daemon off;"

app:
stdin_open: true
tty: true
build: .
image: heartexlabs/label-studio:latest
expose:
- "8080"
depends_on:
- db
environment:
- DJANGO_DB=default
- POSTGRE_NAME=postgres
- POSTGRE_USER=postgres
- POSTGRE_PASSWORD=
- POSTGRE_PORT=5432
- POSTGRE_HOST=db
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
- LABEL_STUDIO_COPY_STATIC_DATA=true
volumes:
- ./mydata:/label-studio/data:rw
# keep in sync with deploy/docker-entrypoint.d/30-copy-static-data.sh
- source: static
target: /label-studio/static_volume
type: volume
volume:
nocopy: true
# nginx:
# image: nginx:1.21
# ports:
# - "8080:80"
# - "8081:443"
# depends_on:
# - app
# environment:
# - LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
# - NGINX_FILE=${NGINX_FILE:-default.conf}
## Optional: Specify SSL termination certificate & key
## Just drop your cert.pem and cert.key into folder 'deploy/nginx/certs'
## - NGINX_SSL_CERT=/certs/cert.pem
## - NGINX_SSL_CERT_KEY=/certs/cert.key
# volumes:
# # keep in sync with deploy/docker-entrypoint.d/30-copy-static-data.sh
# - source: static
# target: /label-studio/label_studio
# type: volume
# volume:
# nocopy: true
# - ./mydata:/label-studio/data:rw
# - ./deploy/nginx/${NGINX_FILE:-default.conf}:/etc/nginx/templates/${NGINX_FILE:-default.conf}.template
# - ./deploy/nginx/scripts:/docker-entrypoint.d/label-studio
# - ./deploy/nginx/certs:/certs:ro
# command: nginx -g "daemon off;"
#
# app:
# stdin_open: true
# tty: true
# build: .
# image: heartexlabs/label-studio:latest
# expose:
# - "8080"
# depends_on:
# - db
# environment:
# - DJANGO_DB=default
# - POSTGRE_NAME=postgres
# - POSTGRE_USER=postgres
# - POSTGRE_PASSWORD=
# - POSTGRE_PORT=5432
# - POSTGRE_HOST=db
# - LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST:-}
# - LABEL_STUDIO_COPY_STATIC_DATA=true
# volumes:
# - ./mydata:/label-studio/data:rw
# # keep in sync with deploy/docker-entrypoint.d/30-copy-static-data.sh
# - source: static
# target: /label-studio/static_volume
# type: volume
# volume:
# nocopy: true

db:
image: postgres:11.5
Expand Down