Skip to content

Commit

Permalink
Change LABEL_STUDIO_BASE_DATA_DIR to BASE_DATA_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
makseq committed Mar 18, 2021
1 parent 1b433ea commit 20ebc5d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt

ENV DJANGO_SETTINGS_MODULE=core.settings.label_studio
ENV LABEL_STUDIO_BASE_DATA_DIR=/label-studio/xxx

docker run -v outside:/some

COPY . /label-studio
RUN python3.8 setup.py develop
Expand Down
2 changes: 1 addition & 1 deletion label_studio/core/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

# Base path for media root and other uploaded files
BASE_DATA_DIR = os.environ.get('LABEL_STUDIO_BASE_DATA_DIR', get_data_dir())
BASE_DATA_DIR = os.environ.get('BASE_DATA_DIR', get_data_dir())
print('Data base and media directory: ', BASE_DATA_DIR)

# Databases
Expand Down
2 changes: 1 addition & 1 deletion label_studio/core/utils/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def get_attr_or_item(obj, key):


def get_env(name, default=None, is_bool=False):
for env_key in [name, 'HEARTEX_' + name, 'LABEL_STUDIO_' + name]:
for env_key in ['HEARTEX_' + name, 'LABEL_STUDIO_' + name, name]:
value = os.environ.get(name)
if value is not None:
if is_bool:
Expand Down
2 changes: 1 addition & 1 deletion nginx/ls.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ server {
}

location /data/upload {
alias /label-studio/label_studio/core/media/upload/;
alias /label-studio/xxx;
}

location /static {
Expand Down

0 comments on commit 20ebc5d

Please sign in to comment.