Python Actions Testin #20
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Demos | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- '.github/workflows/python-demos.yml' | |
- 'demo/python/**' | |
- '!demo/python/README.md' | |
pull_request: | |
branches: [ main, 'v[0-9]+.[0-9]+' ] | |
paths: | |
- '.github/workflows/python-demos.yml' | |
- 'demo/python/**' | |
- '!demo/python/README.md' | |
defaults: | |
run: | |
working-directory: demo/python | |
jobs: | |
build-self-hosted: | |
runs-on: ${{ matrix.machine }} | |
strategy: | |
fail-fast: false | |
matrix: | |
machine: [rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios, pv-windows] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python virtualenv (*nix) | |
if: ${{ matrix.machine != 'pv-windows' }} | |
run: | | |
python3 -m venv .venv | |
. .venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
- name: Setup Python virtualenv (windows) | |
if: ${{ matrix.machine == 'pv-windows' }} | |
run: | | |
python3 -m venv .venv | |
.venv\Scripts\activate | |
echo PATH=$PATH >> $GITHUB_ENV | |
- name: Build dependencies | |
run: | | |
python3 -m pip install setuptools wheel | |
cd ../../binding/python | |
python3 setup.py sdist bdist_wheel | |
python3 -m pip install --force-reinstall dist/pvpicollm-0.1.0-py3-none-any.whl | |
- name: Install Python dependencies | |
run: python3 -m pip install -r requirements.txt | |
- name: Download resource files | |
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.bin/latest/phi2-290.bin -o phi2-290.bin | |
- name: Test | |
run: python3 picollm_demo.py --access_key ${{secrets.PV_VALID_ACCESS_KEY}} --model_path phi2-290.bin --completion_token_limit 10 --generate Hello my name is |