Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastdeploy-gpu-python install problem #10

Open
skyroot opened this issue May 14, 2024 · 7 comments
Open

fastdeploy-gpu-python install problem #10

skyroot opened this issue May 14, 2024 · 7 comments

Comments

@skyroot
Copy link

skyroot commented May 14, 2024

when run "python multi_thread_process_to_doc.py ./pdf --process-num 8",account a ERROR:
Due to the package size limitation, we have not provide fastdeploy-gpu-python on pypi yet, please execute the following commands to reinstall fastdeploy-gpu-python。let me uninstall l fastdeploy-gpu-python,then pip install fastdeploy-gpu-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html,but after these two command,
python multi_thread_process_to_doc.py ./pdf --process-num 8 problem is still appear...

@AlanYan2023
Copy link

Yes! I have the same problem!
"D:\Program Files\MAP-NEO-main\Matrix\document-convert>python multi_thread_process_to_doc.py D:\翻译测试\test.pdf --process-num 8
WARNING:root:Due to the package size limitation, we have not provide fastdeploy-gpu-python on pypi yet, please execute the following commands to reinstall fastdeploy-gpu-python.
WARNING:root: =================== Reinstall fastdeploy-gpu-python commands ==================
WARNING:root: python -m pip uninstall fastdeploy-gpu-python
WARNING:root: python -m pip install fastdeploy-gpu-python -f https://www.paddlepaddle.org.cn/whl/fastdeploy.html
Traceback (most recent call last):
File "D:\Program Files\MAP-NEO-main\Matrix\document-convert\multi_thread_process_to_doc.py", line 4, in
import fastdeploy as fd
File "C:\Users\Alan1\AppData\Local\Programs\Python\Python311\Lib\site-packages\fastdeploy_init_.py", line 22, in
raise Exception("Failed to import fastdeploy module.")
Exception: Failed to import fastdeploy module."

@skyroot
Copy link
Author

skyroot commented May 14, 2024

which your python version?

@skyroot
Copy link
Author

skyroot commented May 14, 2024

python multi_thread_process_to_doc.py pdf --process-num 6
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
[INFO] fastdeploy/runtime/runtime.cc(273)::CreatePaddleBackend Runtime initialized with Backend::PDINFER in Device::GPU.
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt
INFO:cnstd.yolov7.torch_utils:YOLOv7 🚀 2024-5-14 torch 2.3.0+cu121 CUDA:0 (NVIDIA A100-SXM4-80GB, 8182.0MB)

INFO:cnstd.yolov7.layout_analyzer:Use model: models/mfd.pt

can run,but can't use GPU rescource?!

@AlanYan2023
Copy link

which your python version?

Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

@skyroot
Copy link
Author

skyroot commented May 17, 2024

which your python version?

Python 3.11.2 (tags/v3.11.2:878ead1, Feb 7 2023, 16:38:35) [MSC v.1934 64 bit (AMD64)] on win32

it should use 《python=3.10,fastdeploy support python version

@AlanYan2023
Copy link

I changed my python version to 10.0 and reinstalled fastdeploy, but the feedback is as follows.

D:\Program Files\MAP-NEO-main\Matrix\document-convert>python multi_thread_process_to_doc.py D:\翻译测试\test.pdf --process-num 8
Traceback (most recent call last):
File "D:\Program Files\MAP-NEO-main\Matrix\document-convert\multi_thread_process_to_doc.py", line 4, in
import fastdeploy as fd
File "C:\Users\Alan1\AppData\Local\Programs\Python\Python310\lib\site-packages\fastdeploy_init_.py", line 1, in
from . import main
File "C:\Users\Alan1\AppData\Local\Programs\Python\Python310\lib\site-packages\fastdeploy_main_.py", line 1, in
import resource
ModuleNotFoundError: No module named 'resource'

@tslyellow
Copy link

Has this happened to you guys? If so, can you tell me how to fix it? Thanks for the help!

(neo) λ f338777298ab ~/Code/MAP-NEO/document-convert python multi_thread_process_to_doc.py <docs/pdf/1.pdf> --process-num 8
ERROR:albumentations.check_version:Error fetching version info
Traceback (most recent call last):
File "/root/anaconda3/envs/neo/lib/python3.10/site-packages/albumentations/check_version.py", line 29, in fetch_version_info
with opener.open(url, timeout=2) as response:
File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 519, in open
response = self._open(req, data)
File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 496, in _call_chain
result = func(*args)
File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/root/anaconda3/envs/neo/lib/python3.10/urllib/request.py", line 1352, in do_open
r = h.getresponse()
File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 337, in begin
self.headers = self.msg = parse_headers(self.fp)
File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 234, in parse_headers
headers = _read_headers(fp)
File "/root/anaconda3/envs/neo/lib/python3.10/http/client.py", line 214, in _read_headers
line = fp.readline(_MAXLINE + 1)
File "/root/anaconda3/envs/neo/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "/root/anaconda3/envs/neo/lib/python3.10/ssl.py", line 1273, in recv_into
return self.read(nbytes, buffer)
File "/root/anaconda3/envs/neo/lib/python3.10/ssl.py", line 1129, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
Traceback (most recent call last):
File "/root/Code/MAP-NEO/document-convert/multi_thread_process_to_doc.py", line 12, in
from latex.latex_rec import Latex2Text, sort_boxes
File "/root/Code/MAP-NEO/document-convert/latex/latex_rec.py", line 24, in
from cnstd.yolov7.general import xyxy24p, box_partial_overlap
ImportError: cannot import name 'xyxy24p' from 'cnstd.yolov7.general' (/root/anaconda3/envs/neo/lib/python3.10/site-packages/cnstd/yolov7/general.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants