Skip to content

Embedded Windows Release Dependencies #1

Embedded Windows Release Dependencies

Embedded Windows Release Dependencies #1

name: "Embedded Windows Release Dependencies"
on:
workflow_dispatch:
inputs:
xformers:
description: 'xformers version'
required: false
type: string
default: ""
extra_dependencies:
description: 'extra dependencies'
required: false
type: string
default: "\"numpy<2\""
cu:
description: 'cuda version'
required: true
type: string
default: "124"
python_minor:
description: 'python minor version'
required: true
type: string
default: "11"
python_patch:
description: 'python patch version'
required: true
type: string
default: "9"
jobs:
build_and_release_dependencies:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Download and extract embedded Python
shell: bash
run: |
curl https://www.python.org/ftp/python/3.${{ inputs.python_minor }}.${{ inputs.python_patch }}/python-3.${{ inputs.python_minor }}.${{ inputs.python_patch }}-embed-amd64.zip -o python_embedded.zip
unzip python_embedded.zip -d python_embedded
cd python_embedded
# Enable site-packages
sed -i 's/#import site/import site/' python*._pth
- name: Set up Python environment
shell: bash
run: |
cd python_embedded
./python.exe -m ensurepip
./python.exe -m pip install --upgrade pip
- name: Fetch ComfyUI requirements
shell: bash
run: |
curl -o requirements.txt https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt
- name: Install dependencies
shell: bash
run: |
cd python_embedded
./python.exe -m pip install torch torchvision torchaudio ${{ inputs.xformers }} --extra-index-url https://download.pytorch.org/whl/cu${{ inputs.cu }}
./python.exe -m pip install ${{ inputs.extra_dependencies }} -r ../requirements.txt pygit2
- name: Package dependencies
shell: pwsh
run: |
Compress-Archive -Path python_embedded, requirements.txt -DestinationPath windows_python_deps.zip
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "./windows_python_deps.zip"
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: windows-deps-cu${{ inputs.cu }}-py${{ inputs.python_minor }}.${{ inputs.python_patch }}-${{ github.run_number }}
name: Embedded Windows Dependencies CUDA ${{ inputs.cu }} Python ${{ inputs.python_minor }}.${{ inputs.python_patch }} (Build ${{ github.run_number }})
body: |
Windows dependencies for CUDA ${{ inputs.cu }} and Python ${{ inputs.python_minor }}.${{ inputs.python_patch }}
Includes:
- Embedded Python ${{ inputs.python_minor }}.${{ inputs.python_patch }}
- PyTorch dependencies for CUDA ${{ inputs.cu }}
- ComfyUI requirements
draft: false
prerelease: true