forked from OSSInnovation/mindspore
add ms_serving to whl and uncoupling third_party grpc
This commit is contained in:
parent
30bcd0a1fe
commit
34c5971960
|
@ -15,7 +15,7 @@ include(${CMAKE_SOURCE_DIR}/cmake/external_libs/json.cmake)
|
|||
include(${CMAKE_SOURCE_DIR}/cmake/dependency_securec.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/protobuf.cmake)
|
||||
|
||||
if (ENABLE_DEBUGGER)
|
||||
if (ENABLE_DEBUGGER OR ENABLE_SERVING)
|
||||
# build dependencies of gRPC
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/absl.cmake)
|
||||
include(${CMAKE_SOURCE_DIR}/cmake/external_libs/c-ares.cmake)
|
||||
|
|
|
@ -257,3 +257,17 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/mindspore/dataset)
|
|||
COMPONENT mindspore
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_SERVING)
|
||||
install(
|
||||
TARGETS ms_serving
|
||||
DESTINATION ${INSTALL_BASE_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
|
||||
install(
|
||||
TARGETS inference
|
||||
DESTINATION ${INSTALL_LIB_DIR}
|
||||
COMPONENT mindspore
|
||||
)
|
||||
endif ()
|
||||
|
|
|
@ -13,7 +13,6 @@ add_library(protobuf::libprotobuf ALIAS protobuf::protobuf)
|
|||
add_executable(protobuf::libprotoc ALIAS protobuf::protoc)
|
||||
|
||||
set(_PROTOBUF_LIBPROTOBUF protobuf::libprotobuf)
|
||||
set(_REFLECTION gRPC::grpc++_reflection)
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
find_program(_PROTOBUF_PROTOC protoc)
|
||||
else()
|
||||
|
@ -22,10 +21,19 @@ endif()
|
|||
|
||||
# Find gRPC installation
|
||||
# Looks for gRPCConfig.cmake file installed by gRPC's cmake installation.
|
||||
if (EXISTS ${grpc_ROOT}/lib64)
|
||||
set(gRPC_DIR "${grpc_ROOT}/lib64/cmake/grpc")
|
||||
else()
|
||||
set(gRPC_DIR "${grpc_ROOT}/lib/cmake/grpc")
|
||||
endif()
|
||||
message("serving using grpc_DIR : " ${gPRC_DIR})
|
||||
|
||||
find_package(gRPC CONFIG REQUIRED)
|
||||
message(STATUS "Using gRPC ${gRPC_VERSION}")
|
||||
|
||||
set(_GRPC_GRPCPP gRPC::grpc++)
|
||||
set(_REFLECTION gRPC::grpc++_reflection)
|
||||
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
find_program(_GRPC_CPP_PLUGIN_EXECUTABLE grpc_cpp_plugin)
|
||||
else()
|
||||
|
|
3
setup.py
3
setup.py
|
@ -103,6 +103,7 @@ package_data = {
|
|||
'lib/*.so*',
|
||||
'lib/*.a',
|
||||
'.commit_id',
|
||||
'ms_serving'
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -125,6 +126,8 @@ def update_permissions(path):
|
|||
for filename in filenames:
|
||||
file_fullpath = os.path.join(dirpath, filename)
|
||||
os.chmod(file_fullpath, stat.S_IREAD)
|
||||
if filename == "ms_serving":
|
||||
os.chmod(file_fullpath, stat.S_IREAD | stat.S_IEXEC)
|
||||
|
||||
|
||||
class EggInfo(egg_info):
|
||||
|
|
Loading…
Reference in New Issue