Skip to content

Commit

Permalink
latest docker
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Jan 20, 2020
1 parent 4c58b48 commit cf02df7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ WORKDIR /label-studio
COPY requirements.txt /label-studio
RUN pip install -r requirements.txt


ENV PORT="8200"
ENV collect_analytics=0
EXPOSE ${PORT}

COPY . /label-studio

RUN pip install -e .
CMD ["label-studio", "start", "new_project", "--init"]
CMD ["label-studio", "start", "my_project", "--init"]
7 changes: 5 additions & 2 deletions label_studio/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,10 +475,13 @@ def reload(self):
self.label_config_full = config_comments_free(open(self.config['label_config']).read())
self.label_config_line = config_line_stripped(self.label_config_full)

collect_analytics = os.getenv('collect_analytics')
if collect_analytics is None:
collect_analytics = self.config.get('collect_analytics', True)
if self.analytics is None:
self.analytics = Analytics(self.label_config_line, self.config.get('collect_analytics', True), self.name)
self.analytics = Analytics(self.label_config_line, collect_analytics, self.name)
else:
self.analytics.update_info(self.label_config_line, self.config.get('collect_analytics', True), self.name)
self.analytics.update_info(self.label_config_line, collect_analytics, self.name)

# configure project
self.project_obj = ProjectObj(label_config=self.label_config_line, label_config_full=self.label_config_full)
Expand Down

0 comments on commit cf02df7

Please sign in to comment.