Skip to content

Commit

Permalink
Merge pull request #57 from neavo/dev
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
neavo authored Sep 9, 2024
2 parents f5713e2 + ae14708 commit abda4b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/manaul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Create Env
shell: cmd
run: |
.\resource\aria2c.exe https://www.python.org/ftp/python/3.12.5/python-3.12.5-embed-amd64.zip -o python.zip
.\resource\aria2c.exe https://www.python.org/ftp/python/3.12.6/python-3.12.6-embed-amd64.zip -o python.zip
powershell -Command "Expand-Archive -Path 'python.zip' -DestinationPath 'env'"
powershell -Command "Remove-Item -Path 'python.zip' -Recurse -Force -ErrorAction SilentlyContinue"
Expand All @@ -34,6 +34,8 @@ jobs:
- name: Install Requirements
shell: cmd
run: |
.\env\python.exe -m pip install --upgrade pip
.\env\python.exe -m pip install --upgrade setuptools
.\env\python.exe -m pip install -r requirements.txt
.\env\python.exe -m pip cache purge
Expand Down
20 changes: 3 additions & 17 deletions 99_打包.bat
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
powershell -Command "Remove-Item -Path 'dist' -Recurse -Force -ErrorAction SilentlyContinue"

@REM 部署虚拟环境
.\resource\aria2c.exe https://www.python.org/ftp/python/3.12.5/python-3.12.5-embed-amd64.zip -o python.zip
.\resource\aria2c.exe https://www.python.org/ftp/python/3.12.6/python-3.12.6-embed-amd64.zip -o python.zip
powershell -Command "Expand-Archive -Path 'python.zip' -DestinationPath 'env'"
powershell -Command "Remove-Item -Path 'python.zip' -Recurse -Force -ErrorAction SilentlyContinue"

Expand All @@ -19,6 +19,8 @@
powershell -Command "Copy-Item -Path 'resource\python312._pth' -Destination 'env\python312._pth' -Force"

@REM 安装依赖
.\env\python.exe -m pip install --upgrade pip
.\env\python.exe -m pip install --upgrade setuptools
.\env\python.exe -m pip install -r requirements.txt
.\env\python.exe -m pip cache purge

Expand All @@ -40,20 +42,4 @@
copy "blacklist.txt" ".\dist\KeywordGacha\"
copy "libomp140.x86_64.dll" ".\dist\KeywordGacha\"

@REM 压缩dist目录下的所有文件,不包括dist目录本身
@REM .\resource\7za.exe a -y -bt -mx5 -slp KeywordGacha.zip .\dist\*

@REM 切换 Torch 版本
@REM .\dist\KeywordGacha\env\python.exe -m pip uninstall --yes torch torchvision torchaudio
@REM .\dist\KeywordGacha\env\python.exe -m pip install torch --index-url https://download.pytorch.org/whl/cu121
@REM .\dist\KeywordGacha\env\python.exe -m pip cache purge

@REM .\resource\aria2c.exe https://github.com/neavo/KeywordGachaModel/releases/download/kg_ner_20240826/kg_ner_gpu.zip -o kg_ner_gpu.zip
@REM powershell -Command "Expand-Archive -Path 'kg_ner_gpu.zip' -DestinationPath 'dist\KeywordGacha\resource\kg_ner_gpu'"
@REM powershell -Command "Remove-Item -Path 'kg_ner_gpu.zip' -Recurse -Force -ErrorAction SilentlyContinue"
@REM echo > .\dist\KeywordGacha\gpuboost.txt

@REM 压缩dist目录下的所有文件,不包括dist目录本身
@REM .\resource\7za.exe a -y -bt -mx5 -slp -v2000M KeywordGacha_NV.zip .\dist\*

pause

0 comments on commit abda4b8

Please sign in to comment.