我正在进行MLperf,object_detection项目测试。
https://github.com/mlperf/training/tree/master/object_detection
问题1: 做的时候:
nvidia-docker run -v .:/workspace -t -i --rm --ipc=host mlperf/object_detection \
"cd mlperf/training/object_detection && ./install.sh"
它的回应:
docker: Error response from daemon: create .: volume name is too short, names should be at least two alphanumeric characters.
我需要将-v。:更改为-v $ {pwd):/ workspace
问题2:
应用于上述修改时,出现了新错误:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"cd mlperf/training/object_detection && ./install.sh\": stat cd mlperf/training/object_detection && ./install.sh: no such file or directory": unknown.
似乎docker无法接受带空格的字符串,例如:“ cd xxxxxxx && ./install.sh”
如果我将字符串修改为单个命令(./install.sh)
nvidia-docker run -v $(pwd):/workspace -t -i --rm --ipc=host mlperf/object_detection \
"./install.sh"
这将起作用,它看起来不像是错误的路径问题,我测试过使用具有相同错误的绝对路径。
问题3: 按照网页上的步骤操作后,我总是出现错误:
ModuleNotFoundError:没有名为“ maskrcnn_benchmark”的模块
root@nvme:/markkang/mlperf/training/object_detection# nvidia-docker run -v $(pwd):/workspace -t -i --rm --ipc=host mlperf/object_detection "./run_and_time.sh"
/workspace/pytorch /workspace
Traceback (most recent call last):
File "tools/train_mlperf.py", line 8, in <module>
from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:skip
ModuleNotFoundError: No module named 'maskrcnn_benchmark'
答案 0 :(得分:0)
编辑train_mlperf.py
并在调用maskrcnn_benchmark.utils.env
之前插入以下路径代码,例如
import sys
sys.path.append('/workspace/pytorch/')
from maskrcnn_benchmark.utils.env import setup_environment # noqa F401 isort:skip