在 docker 容器内执行 predict_system.py 报错:Error: id must less than GPU count
Created by: myfjdthink
docker 镜像:
hub.baidubce.com/paddlepaddle/paddle:latest-gpu-cuda10.0-cudnn7-dev
python --version :3.7
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:01_CDT_2018 Cuda compilation tools, release 10.0, V10.0.130
nvidia-smi
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 410.48 Driver Version: 410.48 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 GeForce GTX 108... Off | 00000000:02:00.0 Off | N/A | | 25% 47C P5 17W / 275W | 0MiB / 11178MiB | 0% Default | +-------------------------------+----------------------+----------------------+ | 1 GeForce GTX 108... Off | 00000000:03:00.0 Off | N/A | | 26% 46C P5 29W / 275W | 0MiB / 11177MiB | 0% Default | +-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | No running processes found | +-----------------------------------------------------------------------------+
按照这个教程按照的依赖包
执行命令
python3.7 tools/infer/predict_system.py --image_dir="./pans/3.jpg" --det_model_dir="./inference/full/ch_det_r50_vd_db/" --rec_model_dir="./inference/space/ch_rec_r34_vd_crnn_enhance/"