mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2025-12-06 07:12:10 +01:00
Update workflows
This commit is contained in:
parent
09eb326486
commit
1c1cf09a59
|
|
@ -101,7 +101,13 @@ jobs:
|
|||
- name: Build Package
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker
|
||||
VERSION_CLEAN="${{ inputs.version }}"
|
||||
VERSION_CLEAN="${VERSION_CLEAN#v}"
|
||||
cd ..
|
||||
cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}"
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg
|
||||
allowed=("character_bias" "gallery" "openai" "sd_api_pictures")
|
||||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
|
|
@ -116,14 +122,12 @@ jobs:
|
|||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/python.exe -m pip"
|
||||
PACKAGES_PATH="portable_env/Lib/site-packages"
|
||||
ZIP_CMD="powershell -Command \"Compress-Archive -Path text-generation-webui -DestinationPath"
|
||||
rm start_linux.sh start_macos.sh
|
||||
else
|
||||
PLATFORM="linux"
|
||||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-unknown-linux-gnu-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/bin/python -m pip"
|
||||
PACKAGES_PATH="portable_env/lib/python3.11/site-packages"
|
||||
ZIP_CMD="zip -r"
|
||||
rm start_macos.sh start_windows.bat
|
||||
fi
|
||||
|
||||
|
|
@ -132,7 +136,7 @@ jobs:
|
|||
echo "Downloading Python for $PLATFORM..."
|
||||
curl -L -o python-build.tar.gz "$PYTHON_URL"
|
||||
tar -xzf python-build.tar.gz
|
||||
mv python text-generation-webui/portable_env
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on AVX and CUDA
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
|
|
@ -142,7 +146,7 @@ jobs:
|
|||
fi
|
||||
|
||||
# Create CUDA-specific requirements file if needed
|
||||
cd text-generation-webui
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
if [[ "$CUDA_VERSION" == "11.7" ]]; then
|
||||
echo "Creating CUDA 11.7 specific requirements file"
|
||||
sed 's/cu124/cu117/g' "$BASE_REQ_FILE" > requirements_cuda_temp.txt
|
||||
|
|
@ -162,14 +166,13 @@ jobs:
|
|||
|
||||
# 6. Create ZIP file
|
||||
cd ..
|
||||
VERSION_CLEAN="${VERSION#v}"
|
||||
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}.zip"
|
||||
echo "Creating archive: $ZIP_NAME"
|
||||
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME"
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME"
|
||||
else
|
||||
zip -r "$ZIP_NAME" text-generation-webui
|
||||
zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}"
|
||||
fi
|
||||
|
||||
- name: Upload files to a GitHub release
|
||||
|
|
|
|||
|
|
@ -100,7 +100,13 @@ jobs:
|
|||
- name: Build Package
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker
|
||||
VERSION_CLEAN="${{ inputs.version }}"
|
||||
VERSION_CLEAN="${VERSION_CLEAN#v}"
|
||||
cd ..
|
||||
cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}"
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg
|
||||
allowed=("character_bias" "gallery" "openai" "sd_api_pictures")
|
||||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
|
|
@ -114,14 +120,12 @@ jobs:
|
|||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-pc-windows-msvc-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/python.exe -m pip"
|
||||
PACKAGES_PATH="portable_env/Lib/site-packages"
|
||||
ZIP_CMD="powershell -Command \"Compress-Archive -Path text-generation-webui -DestinationPath"
|
||||
rm start_linux.sh start_macos.sh
|
||||
else
|
||||
PLATFORM="linux"
|
||||
PYTHON_URL="https://github.com/astral-sh/python-build-standalone/releases/download/20250409/cpython-3.11.12+20250409-x86_64-unknown-linux-gnu-install_only.tar.gz"
|
||||
PIP_PATH="portable_env/bin/python -m pip"
|
||||
PACKAGES_PATH="portable_env/lib/python3.11/site-packages"
|
||||
ZIP_CMD="zip -r"
|
||||
rm start_macos.sh start_windows.bat
|
||||
fi
|
||||
|
||||
|
|
@ -130,7 +134,7 @@ jobs:
|
|||
echo "Downloading Python for $PLATFORM..."
|
||||
curl -L -o python-build.tar.gz "$PYTHON_URL"
|
||||
tar -xzf python-build.tar.gz
|
||||
mv python text-generation-webui/portable_env
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on AVX
|
||||
if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
|
||||
|
|
@ -140,7 +144,7 @@ jobs:
|
|||
fi
|
||||
REQ_FILE="$BASE_REQ_FILE"
|
||||
|
||||
cd text-generation-webui
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
# 4. Install packages
|
||||
echo "Installing Python packages from $REQ_FILE..."
|
||||
|
|
@ -148,14 +152,13 @@ jobs:
|
|||
|
||||
# 6. Create ZIP file
|
||||
cd ..
|
||||
VERSION_CLEAN="${VERSION#v}"
|
||||
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip"
|
||||
echo "Creating archive: $ZIP_NAME"
|
||||
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME"
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME"
|
||||
else
|
||||
zip -r "$ZIP_NAME" text-generation-webui
|
||||
zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}"
|
||||
fi
|
||||
|
||||
- name: Upload files to a GitHub release
|
||||
|
|
|
|||
17
.github/workflows/build-portable-release.yml
vendored
17
.github/workflows/build-portable-release.yml
vendored
|
|
@ -100,7 +100,13 @@ jobs:
|
|||
- name: Build Package
|
||||
shell: bash
|
||||
run: |
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker
|
||||
VERSION_CLEAN="${{ inputs.version }}"
|
||||
VERSION_CLEAN="${VERSION_CLEAN#v}"
|
||||
cd ..
|
||||
cp -r text-generation-webui "text-generation-webui-${VERSION_CLEAN}"
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
rm -rf .git cmd* update_wizard* Colab-TextGen-GPU.ipynb docker setup.cfg
|
||||
allowed=("character_bias" "gallery" "openai" "sd_api_pictures")
|
||||
find extensions/ -mindepth 1 -maxdepth 1 -type d | grep -v -E "$(printf '%s|' "${allowed[@]}" | sed 's/|$//')" | xargs rm -rf
|
||||
|
||||
|
|
@ -143,10 +149,10 @@ jobs:
|
|||
cd ..
|
||||
curl -L -o python-build.tar.gz "$PYTHON_URL"
|
||||
tar -xzf python-build.tar.gz
|
||||
mv python text-generation-webui/portable_env
|
||||
mv python "text-generation-webui-${VERSION_CLEAN}/portable_env"
|
||||
|
||||
# 3. Prepare requirements file based on platform and AVX
|
||||
cd text-generation-webui
|
||||
cd "text-generation-webui-${VERSION_CLEAN}"
|
||||
|
||||
# Select requirements file based on platform
|
||||
if [[ "$RUNNER_OS" == "macOS" ]]; then
|
||||
|
|
@ -172,14 +178,13 @@ jobs:
|
|||
|
||||
# 5. Create ZIP file
|
||||
cd ..
|
||||
VERSION_CLEAN="${VERSION#v}"
|
||||
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip"
|
||||
echo "Creating archive: $ZIP_NAME"
|
||||
|
||||
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui -DestinationPath $ZIP_NAME"
|
||||
powershell -Command "Compress-Archive -Path text-generation-webui-${VERSION_CLEAN} -DestinationPath $ZIP_NAME"
|
||||
else
|
||||
zip -r "$ZIP_NAME" text-generation-webui
|
||||
zip -r "$ZIP_NAME" "text-generation-webui-${VERSION_CLEAN}"
|
||||
fi
|
||||
|
||||
- name: Upload files to a GitHub release
|
||||
|
|
|
|||
Loading…
Reference in a new issue