提交 581394c5 编写于 作者: B BohaoWu

adjust package

上级 4c37ab63
......@@ -21,12 +21,3 @@ from .lac_reader import LACReader
from .senta_reader import SentaReader
#from .imdb_reader import IMDBDataset
from .ocr_reader import OCRReader
if os.path.exists('libgpupreprocess.so'):
from libgpupreprocess import Image2Gpubuffer, Gpubuffer2Image, RGB2BGR, BGR2RGB
from libgpupreprocess import Div, Sub, Normalize, CenterCrop, Resize, ResizeByFactor
else:
from .image_reader import ImageReader, File2Image, URL2Image
from .image_reader import Sequential, Normalize, Base64ToImage
from .image_reader import CenterCrop, Resize, Transpose, Div
from .image_reader import RGB2BGR, BGR2RGB, ResizeByFactor
......@@ -40,12 +40,6 @@ max_version, mid_version, min_version = python_version()
if '${PACK}' == 'ON':
copy_lib()
if os.path.exists('../core/preprocess/hwvideoframe/libgpupreprocess.so'):
os.system('mkdir -p ./paddle_serving_app/reader/lib')
os.system('cp ../core/preprocess/hwvideoframe/libgpupreprocess.so ./paddle_serving_app/reader')
os.system('cp ../core/preprocess/hwvideoframe/cuda/libgpu.so ./paddle_serving_app/reader/lib')
os.system('export LD_LIBRARY_PATH="./paddle_serving_app/reader/lib"')
REQUIRED_PACKAGES = [
'six >= 1.10.0', 'sentencepiece<=0.1.92', 'opencv-python<=4.2.0.32', 'pillow',
'pyclipper'
......@@ -59,7 +53,11 @@ packages=['paddle_serving_app',
'paddle_serving_app.reader.pddet',
'paddle_serving_app.reader.lib']
package_data={}
if os.path.exists('../core/preprocess/hwvideoframe/libgpupreprocess.so'):
package_data={'paddle_serving_app': ['../core/preprocess/hwvideoframe/libgpupreprocess.so'],}
else:
package_data={}
package_dir={'paddle_serving_app':
'${PADDLE_SERVING_BINARY_DIR}/python/paddle_serving_app',
'paddle_serving_app.proto':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册