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

cpu_thread_num does't work with docker image python:3.9.16-slim-buster #1577

Closed
shao77622 opened this issue Mar 11, 2023 · 3 comments
Closed

Comments

@shao77622
Copy link

shao77622 commented Mar 11, 2023

Environment

FastDeploy version: e.g 0.8.0 or the latest code in develop branch

root@1cfb49fa663e:/home/aiBox# pip list
Package Version


anyio 3.6.2
asgiref 3.6.0
certifi 2022.12.7
charset-normalizer 3.1.0
click 8.1.3
faiss-cpu 1.7.3
fastapi 0.93.0
fastdeploy-python 1.0.4
fastdeploy-tools 0.0.5
h11 0.14.0
idna 3.4
numpy 1.24.2
opencv-python 4.7.0.72
Pillow 9.4.0
pip 22.0.4
pydantic 1.10.6
PyYAML 6.0
requests 2.28.2
schedule 1.1.0
setuptools 58.1.0
sniffio 1.3.0
starlette 0.25.0
tqdm 4.65.0
typing_extensions 4.5.0
urllib3 1.26.14
uvicorn 0.16.0
wheel 0.38.4

OS Platform: e.g. Linux x64 / Windows x64 / Mac OSX 12.1(arm or intel)

Linux 1cfb49fa663e 5.10.104-linuxkit #1 SMP Wed Mar 9 19:05:23 UTC 2022 x86_64 GNU/Linux

Hardware: e.g. Nvidia GPU 3080Ti CUDA 11.2 CUDNN 8.3
macbook pro 2019 i9 8 core
Program Language: e.g. Python 3.8

Python 3.9.16 (main, Mar 1 2023, 15:52:45)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import sys
print(sys.version_info)
sys.version_info(major=3, minor=9, micro=16, releaselevel='final', serial=0)
print(sys.version)
3.9.16 (main, Mar 1 2023, 15:52:45)
[GCC 8.3.0]

Problem description

Please attach the log file if there's problem happend.
fastdeploy infer always use 1 cpu , with max 100%, the option.set_cpu_thread_num() does't work .
But without docker, just run on mac aconda python 3.9 , it works!

@shao77622
Copy link
Author

And this is the mac python info below, should be any problems with the deference between GCC 8.3.0 and Clang 14.0.6 ?

Python 3.9.16 (main, Jan 11 2023, 10:02:19)
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.

import sys
print(sys.version_info)
sys.version_info(major=3, minor=9, micro=16, releaselevel='final', serial=0)
print(sys.version)
3.9.16 (main, Jan 11 2023, 10:02:19)
[Clang 14.0.6 ]

@shao77622
Copy link
Author

OPENVINO does not support multi cpu, but ort backend works.

@jiangjiajun
Copy link
Collaborator

While inference with OpenVINO, the cpu_thread_num doesn't mean that the engine will use the setting number of threads to inference, it means the number of threads it used will not exceed the cpu_thread_num

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

2 participants