Skip to content

Commit

Permalink
show log when waiting for docker pull
Browse files Browse the repository at this point in the history
  • Loading branch information
solderzzc committed Sep 28, 2022
1 parent 49b7a77 commit 46c79c8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def get_version() -> str:
return "0.1.37"
return "0.1.38"

install_requires = [
"requests",
Expand Down
15 changes: 9 additions & 6 deletions src/sharpai_hub/commands/yolov7_reid.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ def helper_to_setup_labelstudio(self):
\n- 1. Pulling latest docker images from docker-hub, time may vary depending on you network situation...')

f = open(self.env_path,"w")
command = f'{self.docker_compose_path} -f {self.yml_path} pull'

output = subprocess.getoutput(command)
print(output)
print('Pulling latest docker images from docker hub...')
args = [self.docker_compose_path, '-f' , self.yml_path,'pull']
p = subprocess.Popen(args= args, cwd=self.runtime_folder)
p.wait()

print('- 2. Starting Labelstudio service', end = '')

args = [self.docker_compose_path, '-f' , self.yml_path,'up','-d','labelstudio']
Expand Down Expand Up @@ -175,10 +177,11 @@ def run(self):
print('Failed to set labelstudio')
exit(-1)

command = f'{self.docker_compose_path} -f {self.yml_path} pull'
subprocess.getoutput(command)
print('Pulling latest docker images from docker hub...')
args = [self.docker_compose_path, '-f' , self.yml_path,'pull']
p = subprocess.Popen(args= args, cwd=self.runtime_folder)
p.wait()

log_handle = open(self.log_path,'a')
args = [self.docker_compose_path, '-f' , self.yml_path,'up','-d']
subprocess.Popen(args= args, cwd=self.runtime_folder)

Expand Down

0 comments on commit 46c79c8

Please sign in to comment.