-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1851 from janhq/chore/v1.0.9-rc1
chore: sync dev to main v1.0.9-rc1
- Loading branch information
Showing
121 changed files
with
11,608 additions
and
1,124 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build and Package Python Code | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
model_dir: | ||
description: "Path to model directory in github repo" | ||
required: true | ||
repo_name: | ||
description: "name of repo to be checked out" | ||
required: true | ||
branch_name: | ||
description: "name of branch to be checked out" | ||
required: true | ||
default: main | ||
hf_repo: | ||
description: "name of huggingface repo to be pushed" | ||
required: true | ||
hf_prefix_branch: | ||
description: "prefix of hf branch" | ||
required: false | ||
|
||
env: | ||
MODEL_DIR: ${{ inputs.model_dir }} | ||
REPO_NAME: ${{ inputs.repo_name}} | ||
BRANCH_NAME: ${{ inputs.branch_name }} | ||
HF_REPO: ${{ inputs.hf_repo }} | ||
HF_PREFIX_BRANCH: ${{ inputs.hf_prefix_branch }} | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ${{ matrix.runs-on }} | ||
timeout-minutes: 3600 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- os: "linux" | ||
name: "amd64" | ||
runs-on: "ubuntu-20-04-cuda-12-0" | ||
- os: "mac" | ||
name: "amd64" | ||
runs-on: "macos-selfhosted-12" | ||
- os: "mac" | ||
name: "arm64" | ||
runs-on: "macos-selfhosted-12-arm64" | ||
- os: "windows" | ||
name: "amd64" | ||
runs-on: "windows-cuda-12-0" | ||
steps: | ||
- name: Clone | ||
id: checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
repository: ${{env.REPO_NAME}} | ||
ref: ${{env.BRANCH_NAME}} | ||
- name: use python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install hf-transfer huggingface_hub | ||
- name: Upload Artifact | ||
run: | | ||
huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN_WRITE }} --add-to-git-credential | ||
cd ${{env.MODEL_DIR}} && huggingface-cli upload ${{env.HF_REPO}} . . --revision ${{env.HF_PREFIX_BRANCH}}-${{ matrix.os }}-${{ matrix.name }} | ||
huggingface-cli logout |
Oops, something went wrong.