* LLM: init one-click installer for windows * LLM: fix typo in one-click installer readme * LLM: one-click installer try except logic * LLM: one-click installer add dependency * LLM: one-click installer adjust README.md * LLM: one-click installer split README and add zip compress in setup.bat * LLM: one-click installer verified internlm and llama2 and replace gif * LLM: remove one-click installer images * LLM: finetune the one-click installer README.md * LLM: fix typo in one-click installer README.md * LLM: rename one-click installer to protable executable * LLM: rename other places to protable executable * LLM: rename the zip filename to executable * LLM: update .gitignore * LLM: add colorama to setup.bat
23 lines
1.1 KiB
Batchfile
23 lines
1.1 KiB
Batchfile
:: download python and extract zip
|
|
powershell -Command "Start-BitsTransfer -Source https://www.python.org/ftp/python/3.9.13/python-3.9.13-embed-amd64.zip -Destination python-3.9.13-embed-amd64.zip"
|
|
powershell -Command "Expand-Archive .\python-3.9.13-embed-amd64.zip -DestinationPath .\python-embed"
|
|
del .\python-3.9.13-embed-amd64.zip
|
|
|
|
set "python-embed=.\python-embed\python.exe"
|
|
|
|
:: download get-pip.py and install
|
|
powershell -Command "Invoke-WebRequest https://bootstrap.pypa.io/get-pip.py -OutFile .\python-embed\get-pip.py"
|
|
%python-embed% .\python-embed\get-pip.py
|
|
|
|
:: enable run site.main() automatically
|
|
cd .\python-embed
|
|
set "search=#import site"
|
|
set "replace=import site"
|
|
powershell -Command "(gc python39._pth) -replace '%search%', '%replace%' | Out-File -encoding ASCII python39._pth"
|
|
cd ..
|
|
|
|
:: install pip packages
|
|
%python-embed% -m pip install bigdl-llm[all] transformers_stream_generator tiktoken einops colorama
|
|
|
|
:: compress the python and scripts
|
|
powershell -Command "Compress-Archive -Path '.\python-embed', '.\chat.bat', '.\chat.py', '.\README.md' -DestinationPath .\portable-executable.zip"
|