You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
paddleocr gpu部署报错OSError: (External) CUDA error(3), initialization error. [Hint: 'cudaErrorInitializationError'. The API call failed because the CUDA driver and runtime could not be initialized. ] (at /paddle/paddle/fluid/platform/gpu_info.cc:355)
#5344
Closed
sangwentao opened this issue
Jan 25, 2022
· 2 comments
完整报错/Complete Error Message:
*** Starting uWSGI 2.0.19.1 (64bit) on [Tue Jan 25 14:07:16 2022] ***
compiled with version: 9.3.0 on 02 March 2021 12:41:33
os: Linux-5.10.60-9.al8.x86_64 Upload PaddleOCR code #1 SMP Mon Sep 6 21:30:37 CST 2021
nodename: xybot-gpu-001
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/yunshuo/PaddleOCR-release-2.3
writing pidfile to uwsgi.pid
detected binary path: /root/anaconda3/envs/ocr_python36/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /home/yunshuo/PaddleOCR-release-2.3/
your processes number limit is 123187
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01) [GCC 9.3.0]
Python main interpreter initialized at 0x563dadc964e0
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145840 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x563dadc964e0 pid: 508015 (default app)
mountpoint already configured. skip.
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 508015)
spawned uWSGI worker 1 (pid: 508038, cores: 1)
*** Stats server enabled on 127.0.0.1:9191 fd: 17 ***
[pid: 508038|app: 0|req: 1/1] 124.160.31.180 () {44 vars in 825 bytes} [Tue Jan 25 14:07:24 2022] GET /ocr => generated 4817 bytes in 12 msecs (HTTP/1.1 200) 2 headers in 81 bytes (1 switches on core 0)
[2022-01-25 14:08:10,024] ERROR in app: Exception on /ocr_result [POST]
Traceback (most recent call last):
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "./run.py", line 90, in ocr
box,rec,img = ocr_main(args,img)
File "./ocr.py", line 39, in ocr_main
text_sys = TextSystem(args)
File "./tools/infer/predict_system.py", line 45, in init
self.text_detector = predict_det.TextDetector(args)
File "./tools/infer/predict_det.py", line 99, in init
args, 'det', logger)
File "./tools/infer/utility.py", line 283, in create_predictor
predictor = inference.create_predictor(config)
OSError: (External) CUDA error(3), initialization error.
[Hint: 'cudaErrorInitializationError'. The API call failed because the CUDA driver and runtime could not be initialized. ] (at /paddle/paddle/fluid/platform/gpu_info.cc:355)
[pid: 508038|app: 0|req: 2/2] 124.160.31.180 () {48 vars in 917 bytes} [Tue Jan 25 14:07:29 2022] POST /ocr_result => generated 290 bytes in 40128 msecs (HTTP/1.1 500) 2 headers in 99 bytes (1 switches on core 0)
Tue Jan 25 14:17:59 2022 - *** /home/yunshuo/PaddleOCR-release-2.3 has been touched... grace them all !!! ***
Since you haven't replied for more than 3 months, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
It is recommended to pull and try the latest code first.
由于您超过三个月未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。
an1018
pushed a commit
to an1018/PaddleOCR
that referenced
this issue
Aug 17, 2022
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
阿里云服务器,阿里云内核
paddleocr2.3,uwsgi,nginx1.8.1,gpu T4 16G
uwsgi启动:uwsgi --ini uwsgi.ini
[uwsgi] master=true socket = 127.0.0.1:8000 module = run:app chdir = /home/yunshuo/PaddleOCR-release-2.3/ wsgi-file = /home/yunshuo/PaddleOCR-release-2.3/run.py callable = app processes=1 threads=1 stats = 127.0.0.1:9191 pidfile=uwsgi.pid touch-reload=/home/yunshuo/PaddleOCR-release-2.3 daemonize = /home/logs/flask/server.log
之后启动nginx,
worker_processes 1;
*** Starting uWSGI 2.0.19.1 (64bit) on [Tue Jan 25 14:07:16 2022] ***
compiled with version: 9.3.0 on 02 March 2021 12:41:33
os: Linux-5.10.60-9.al8.x86_64 Upload PaddleOCR code #1 SMP Mon Sep 6 21:30:37 CST 2021
nodename: xybot-gpu-001
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
current working directory: /home/yunshuo/PaddleOCR-release-2.3
writing pidfile to uwsgi.pid
detected binary path: /root/anaconda3/envs/ocr_python36/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
chdir() to /home/yunshuo/PaddleOCR-release-2.3/
your processes number limit is 123187
your memory page size is 4096 bytes
detected max file descriptor number: 65535
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 127.0.0.1:8000 fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.6.13 | packaged by conda-forge | (default, Feb 19 2021, 05:36:01) [GCC 9.3.0]
Python main interpreter initialized at 0x563dadc964e0
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145840 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x563dadc964e0 pid: 508015 (default app)
mountpoint already configured. skip.
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 508015)
spawned uWSGI worker 1 (pid: 508038, cores: 1)
*** Stats server enabled on 127.0.0.1:9191 fd: 17 ***
[pid: 508038|app: 0|req: 1/1] 124.160.31.180 () {44 vars in 825 bytes} [Tue Jan 25 14:07:24 2022] GET /ocr => generated 4817 bytes in 12 msecs (HTTP/1.1 200) 2 headers in 81 bytes (1 switches on core 0)
[2022-01-25 14:08:10,024] ERROR in app: Exception on /ocr_result [POST]
Traceback (most recent call last):
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/root/anaconda3/envs/ocr_python36/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "./run.py", line 90, in ocr
box,rec,img = ocr_main(args,img)
File "./ocr.py", line 39, in ocr_main
text_sys = TextSystem(args)
File "./tools/infer/predict_system.py", line 45, in init
self.text_detector = predict_det.TextDetector(args)
File "./tools/infer/predict_det.py", line 99, in init
args, 'det', logger)
File "./tools/infer/utility.py", line 283, in create_predictor
predictor = inference.create_predictor(config)
OSError: (External) CUDA error(3), initialization error.
[Hint: 'cudaErrorInitializationError'. The API call failed because the CUDA driver and runtime could not be initialized. ] (at /paddle/paddle/fluid/platform/gpu_info.cc:355)
[pid: 508038|app: 0|req: 2/2] 124.160.31.180 () {48 vars in 917 bytes} [Tue Jan 25 14:07:29 2022] POST /ocr_result => generated 290 bytes in 40128 msecs (HTTP/1.1 500) 2 headers in 99 bytes (1 switches on core 0)
Tue Jan 25 14:17:59 2022 - *** /home/yunshuo/PaddleOCR-release-2.3 has been touched... grace them all !!! ***
上面是uwsgi的日志。
我单纯的用python起服务,就是python run.py启动是没有错误的,gpu是可以用的,
但是用uwsgi和nginx启动服务就会报上面的错误,我把配置文件的进程的线程都改为1也是有同样的错误。
现在不知道怎么解决,不知道是哪的问题
The text was updated successfully, but these errors were encountered: