mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 10:36:30 +00:00
add list files for autoupdate feature
put new Versioning fix bugs
This commit is contained in:
@@ -4,7 +4,7 @@ from PyInstaller.utils.hooks import collect_all
|
||||
|
||||
datas = [('venv\\Lib\\site-packages\\cv2', 'cv2')]
|
||||
binaries = []
|
||||
hiddenimports = ['constants', 'file_data', 'remote_command', 'remote_command_handler', 'annotation', 'loader_client', 'ai_config', 'tensorrt_engine', 'onnx_engine', 'inference_engine', 'inference', 'main-inf']
|
||||
hiddenimports = ['constants', 'file_data', 'loader_client', 'remote_command', 'remote_command_handler', 'annotation', 'loader_client', 'ai_config', 'tensorrt_engine', 'onnx_engine', 'inference_engine', 'inference', 'main-inf']
|
||||
hiddenimports += collect_submodules('cv2')
|
||||
tmp_ret = collect_all('psutil')
|
||||
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
|
||||
|
||||
@@ -51,12 +51,10 @@ robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "ai_config
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "constants.cp312-win_amd64.pyd" "file_data.cp312-win_amd64.pyd"
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "remote_command.cp312-win_amd64.pyd" "remote_command_handler.cp312-win_amd64.pyd"
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "inference.cp312-win_amd64.pyd" "inference_engine.cp312-win_amd64.pyd"
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "tensorrt_engine.cp312-win_amd64.pyd" "onnx_engine.cp312-win_amd64.pyd" "main_inference.cp312-win_amd64.pyd"
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "loader_client.cp312-win_amd64.pyd" "tensorrt_engine.cp312-win_amd64.pyd"
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-azaion\_internal" "onnx_engine.cp312-win_amd64.pyd" "main_inference.cp312-win_amd64.pyd"
|
||||
|
||||
robocopy "dist\azaion-inference\_internal" "..\dist-dlls\_internal" /E
|
||||
robocopy "dist\azaion-inference" "..\dist-azaion" "azaion-inference.exe" /E
|
||||
|
||||
REM copy for local run
|
||||
robocopy "c:\share\" "dist\azaion-inference\_internal /E
|
||||
robocopy "dist\azaion-inference" "..\dist-azaion" "azaion-inference.exe"
|
||||
|
||||
cd /d %CURRENT_DIR%
|
||||
|
||||
@@ -14,3 +14,11 @@ cdef class UploadFileData(FileData):
|
||||
cdef from_msgpack(bytes data)
|
||||
|
||||
cdef bytes serialize(self)
|
||||
|
||||
cdef class FileList:
|
||||
cdef public list[str] files
|
||||
|
||||
@staticmethod
|
||||
cdef from_msgpack(bytes data)
|
||||
|
||||
cdef bytes serialize(self)
|
||||
@@ -37,4 +37,16 @@ cdef class UploadFileData(FileData):
|
||||
"Resource": self.resource,
|
||||
"Folder": self.folder,
|
||||
"Filename": self.filename
|
||||
})
|
||||
})
|
||||
|
||||
cdef class FileList:
|
||||
def __init__(self, list[str] files):
|
||||
self.files = files
|
||||
|
||||
@staticmethod
|
||||
cdef from_msgpack(bytes data):
|
||||
unpacked = unpackb(data, strict_map_key=False)
|
||||
return FileList(unpacked.get("files"))
|
||||
|
||||
cdef bytes serialize(self):
|
||||
return packb({ "files": self.files })
|
||||
|
||||
@@ -28,7 +28,7 @@ cdef class LoaderClient:
|
||||
return LoadResult(f"Unexpected response command type: {response.command_type}")
|
||||
|
||||
cdef upload_big_small_resource(self, bytes content, str filename, str directory):
|
||||
cdef UploadFileData upload_file_data = UploadFileData(content, filename, directory)
|
||||
cdef UploadFileData upload_file_data = UploadFileData(content, folder=directory, filename=filename)
|
||||
cdef RemoteCommand upload_resp = self._send_receive_command(RemoteCommand(CommandType.UPLOAD_BIG_SMALL, data=upload_file_data.serialize()))
|
||||
if upload_resp.command_type == CommandType.OK:
|
||||
return LoadResult(None, None)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
cdef enum CommandType:
|
||||
OK = 3
|
||||
LOGIN = 10
|
||||
LIST_REQUEST = 15
|
||||
LIST_FILES = 18
|
||||
LOAD = 20
|
||||
LOAD_BIG_SMALL = 22
|
||||
UPLOAD_BIG_SMALL = 24
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import msgpack
|
||||
|
||||
cdef class RemoteCommand:
|
||||
def __init__(self, CommandType command_type, bytes data, str message=None):
|
||||
def __init__(self, CommandType command_type, bytes data=None, str message=None):
|
||||
self.command_type = command_type
|
||||
self.data = data
|
||||
self.message = message
|
||||
|
||||
def __str__(self):
|
||||
command_type_names = {
|
||||
3: "OK",
|
||||
3: "OK",
|
||||
10: "LOGIN",
|
||||
15: "LIST_REQUEST",
|
||||
18: "LIST_FILES",
|
||||
20: "LOAD",
|
||||
22: "LOAD_BIG_SMALL",
|
||||
24: "UPLOAD_BIG_SMALL",
|
||||
|
||||
Reference in New Issue
Block a user