Skip to content

Commit 99a2492

Browse files
committed
[update] version
1 parent ff9c730 commit 99a2492

File tree

2 files changed

+81
-8
lines changed

2 files changed

+81
-8
lines changed

projects/llm_framework/main_openai_api/SConstruct

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,26 @@ STATIC_FILES += Glob('mode_*.json')
3232
STATIC_FILES += [ModuleLLMOpenAIPluginPath]
3333
STATIC_FILES += [os.path.join(python_venv, 'openai-api')]
3434

35+
IGNORE_FILES = []
36+
IGNORE_FILES += ['openai-api']
37+
IGNORE_FILES += [os.path.basename(ModuleLLMOpenAIPluginPath)]
38+
39+
40+
import json
41+
if not os.path.exists('../dist'):
42+
os.makedirs('../dist')
43+
ignore = {'ignore':[]}
44+
try:
45+
with open('../dist/fileignore', 'a+') as f:
46+
f.seek(0)
47+
ignore = json.load(f)
48+
except:
49+
pass
50+
ignore['ignore'] += IGNORE_FILES
51+
ignore['ignore'] = list(set(ignore['ignore']))
52+
with open('../dist/fileignore', 'w') as f:
53+
json.dump(ignore, f, indent=4)
54+
3555
env['COMPONENTS'].append({'target':'llm_openai_api',
3656
'SRCS':SRCS,
3757
'INCLUDE':INCLUDE,

projects/llm_framework/tools/llm_pack.py

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,27 @@ def create_lib_deb(package_name, version, src_folder, revision = 'm5stack1'):
2727
if os.path.exists(deb_folder):
2828
shutil.rmtree(deb_folder)
2929
os.makedirs(deb_folder, exist_ok = True)
30-
30+
fileignore = {'ignore':[]}
31+
try:
32+
with open(os.path.join(src_folder, 'fileignore'), 'r') as f:
33+
fileignore = json.load(f)
34+
except:
35+
pass
3136
for item in os.listdir(src_folder):
32-
if item.startswith('llm_') or item.startswith('tokenizer_') or item.startswith('llm-kws_'):
37+
if item.startswith('llm_') or item.startswith('tokenizer_') or item.startswith('llm-kws_') or item.startswith('mode_') or item in fileignore['ignore']:
3338
continue
3439
elif item.startswith('lib'):
3540
os.makedirs(os.path.join(deb_folder, 'opt/m5stack/lib'), exist_ok = True)
3641
shutil.copy2(os.path.join(src_folder, item), os.path.join(deb_folder, 'opt/m5stack/lib', item))
37-
elif not item.startswith('mode_'):
42+
else:
3843
os.makedirs(os.path.join(deb_folder, 'opt/m5stack/share'), exist_ok = True)
39-
shutil.copy2(os.path.join(src_folder, item), os.path.join(deb_folder, 'opt/m5stack/share', item))
44+
source_path = os.path.join(src_folder, item)
45+
target_path = os.path.join(deb_folder, 'opt/m5stack/share', item)
46+
if os.path.isfile(source_path):
47+
shutil.copy2(source_path, target_path)
48+
elif os.path.isdir(source_path):
49+
shutil.copytree(source_path, target_path)
50+
4051
# os.makedirs(os.path.join(deb_folder, 'opt/m5stack/data'), exist_ok = True)
4152

4253
# zip_file = 'm5stack_scripts.tar.gz'
@@ -287,6 +298,7 @@ def create_bin_deb(package_name, version, src_folder, revision = 'm5stack1'):
287298

288299
if "clean" in sys.argv:
289300
os.system('rm ./*.deb')
301+
os.system('find . -maxdepth 1 -type d ! -name "." -exec rm -rf {} +')
290302
exit(0)
291303
if "distclean" in sys.argv:
292304
os.system('rm ./*.deb m5stack_* -rf')
@@ -308,19 +320,60 @@ def create_bin_deb(package_name, version, src_folder, revision = 'm5stack1'):
308320
else:
309321
cpu_count = cpu_count - 2
310322
# cpu_count = 50
311-
323+
#################################################注意################################################
324+
#################################################注意################################################
325+
#################################################注意################################################
326+
#################################################注意################################################
327+
# 添加新模型版本号从 0.1 版本号开始累加
328+
# 当单元和前单元不兼容时提升大版本号
329+
# 当模型和前模型不兼容时提升大版本号
330+
# 加速单元和模型单元的大版本号保持一致,以有的更新暂不改变,从2025年 04月 03日开始
331+
# Start adding new model version numbers from the 0.1 version number.
332+
# Increment the major version number when units and previous units are incompatible
333+
# Increment the major version number when models and previous models are incompatible
334+
# Keep the major version numbers of acceleration units and model units consistent, with some updates not changing them, starting from April 3, 2025.
335+
#################################################注意################################################
336+
#################################################注意################################################
337+
#################################################注意################################################
338+
#################################################注意################################################
339+
#################################################注意################################################
340+
# 添加新模型版本号从 0.1 版本号开始累加
341+
# 当单元和前单元不兼容时提升大版本号
342+
# 当模型和前模型不兼容时提升大版本号
343+
# 加速单元和模型单元的大版本号保持一致,以有的更新暂不改变,从2025年 04月 03日开始
344+
# Start adding new model version numbers from the 0.1 version number.
345+
# Increment the major version number when units and previous units are incompatible
346+
# Increment the major version number when models and previous models are incompatible
347+
# Keep the major version numbers of acceleration units and model units consistent, with some updates not changing them, starting from April 3, 2025.
348+
#################################################注意################################################
349+
#################################################注意################################################
350+
#################################################注意################################################
351+
#################################################注意################################################
352+
# 添加新模型版本号从 0.1 版本号开始累加
353+
# 当单元和前单元不兼容时提升大版本号
354+
# 当模型和前模型不兼容时提升大版本号
355+
# 加速单元和模型单元的大版本号保持一致,以有的更新暂不改变,从2025年 04月 03日开始
356+
# Start adding new model version numbers from the 0.1 version number.
357+
# Increment the major version number when units and previous units are incompatible
358+
# Increment the major version number when models and previous models are incompatible
359+
# Keep the major version numbers of acceleration units and model units consistent, with some updates not changing them, starting from April 3, 2025.
360+
#################################################注意################################################
361+
#################################################注意################################################
362+
#################################################注意################################################
363+
#################################################注意################################################
364+
#################################################注意################################################
312365
Tasks = {
313366
'lib-llm':[create_lib_deb,'lib-llm', 1.6, src_folder, revision],
314367
'llm-sys':[create_bin_deb,'llm-sys', version, src_folder, revision],
315368
'llm-audio':[create_bin_deb,'llm-audio', version, src_folder, revision],
316369
'llm-kws':[create_bin_deb,'llm-kws', version, src_folder, revision],
317370
'llm-asr':[create_bin_deb,'llm-asr', version, src_folder, revision],
318-
'llm-llm':[create_bin_deb,'llm-llm', version, src_folder, revision],
371+
'llm-llm':[create_bin_deb,'llm-llm', '1.6', src_folder, revision],
319372
'llm-tts':[create_bin_deb,'llm-tts', version, src_folder, revision],
320373
'llm-melotts':[create_bin_deb,'llm-melotts', version, src_folder, revision],
321-
'llm-camera':[create_bin_deb,'llm-camera', version, src_folder, revision],
374+
'llm-camera':[create_bin_deb,'llm-camera', '1.6', src_folder, revision],
322375
'llm-vlm':[create_bin_deb,'llm-vlm', version, src_folder, revision],
323-
'llm-yolo':[create_bin_deb,'llm-yolo', version, src_folder, revision],
376+
'llm-yolo':[create_bin_deb,'llm-yolo', '1.6', src_folder, revision],
324377
'llm-skel':[create_bin_deb,'llm-skel', version, src_folder, revision],
325378
'llm-depth-anything':[create_bin_deb,'llm-depth-anything', version, src_folder, revision],
326379
'llm-vad':[create_bin_deb,'llm-vad', version, src_folder, revision],

0 commit comments

Comments
 (0)