提交 c72c64ac 编写于 作者: K Kentaro Wada

Check if docker is installed

上级 47a01376
#!/usr/bin/env python
import argparse
import distutils.spawn
import json
import os
import os.path as osp
......@@ -9,6 +10,8 @@ import shlex
import subprocess
import sys
from labelme import logger
def get_ip():
dist = platform.platform().split('-')[0]
......@@ -80,6 +83,10 @@ def main():
parser.add_argument('-O', '--output')
args = parser.parse_args()
if not distutils.spawn.find_executable('docker'):
logger.error('Please install docker.')
sys.exit(1)
try:
out_file = labelme_on_docker(args.in_file, args.output)
if out_file:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册