Explorar el Código

Fix labelme_on_docker

Kentaro Wada hace 7 años
padre
commit
f77477be92
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      labelme/cli/on_docker.py

+ 3 - 1
labelme/cli/on_docker.py

@@ -17,6 +17,8 @@ def get_ip():
     elif dist == 'Darwin':
     elif dist == 'Darwin':
         cmd = 'ifconfig en0'
         cmd = 'ifconfig en0'
         output = subprocess.check_output(shlex.split(cmd))
         output = subprocess.check_output(shlex.split(cmd))
+        if str != bytes:  # Python3
+            output = output.decode('utf-8')
         for row in output.splitlines():
         for row in output.splitlines():
             cols = row.strip().split(' ')
             cols = row.strip().split(' ')
             if cols[0] == 'inet':
             if cols[0] == 'inet':
@@ -46,7 +48,7 @@ def labelme_on_docker(image_file, out_file):
         ' -v {1}:{2}' \
         ' -v {1}:{2}' \
         ' -v {3}:{4}' \
         ' -v {3}:{4}' \
         ' -w /home/developer' \
         ' -w /home/developer' \
-        ' labelme' \
+        ' wkentaro/labelme' \
         ' labelme {2} -O {4}'
         ' labelme {2} -O {4}'
     cmd = cmd.format(
     cmd = cmd.format(
         ip,
         ip,