-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added github workflows, minor fixes on init/deps
- Loading branch information
1 parent
6147aff
commit c3ac01a
Showing
8 changed files
with
236 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[ | ||
{ | ||
"hardwareConfig": { | ||
"endpointConfig": { | ||
"gpuIds": "AMPERE_16", | ||
"name": "16GB GPU" | ||
} | ||
}, | ||
"input": { | ||
"audio": "https://github.com/runpod-workers/sample-inputs/raw/main/audio/gettysburg.wav", | ||
"model_name": "tiny", | ||
"language": null, | ||
"batch_size": 16 | ||
} | ||
} | ||
] |
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,35 @@ | ||
name: Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
docker: | ||
runs-on: DO | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ${{ vars.DOCKERHUB_REPO }}/${{ vars.DOCKERHUB_IMG }}:dev | ||
- uses: actions/checkout@v3 | ||
- name: Run Tests | ||
uses: direlines/[email protected] | ||
with: | ||
image-tag: ${{ vars.DOCKERHUB_REPO }}/${{ vars.DOCKERHUB_IMG }}:dev | ||
runpod-api-key: ${{ secrets.RUNPOD_API_KEY }} | ||
request-timeout: 600 |
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,27 @@ | ||
name: Docker Image | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
docker: | ||
runs-on: DO | ||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: true | ||
tags: ${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:${{ github.event.release.tag_name }} |
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,52 @@ | ||
name: CI | Update runpod package version | ||
|
||
on: | ||
repository_dispatch: | ||
types: [python-package-release] | ||
|
||
push: | ||
branches: | ||
- "main" | ||
- "master" | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
check_dep: | ||
runs-on: ubuntu-latest | ||
name: Check python requirements file and update | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check for new package version and update | ||
run: | | ||
# Get current version | ||
current_version=$(grep -oP 'runpod==\K[^"]+' ./builder/requirements.txt) | ||
# Get new version | ||
new_version=$(curl -s https://pypi.org/pypi/runpod/json | jq -r .info.version) | ||
echo "NEW_VERSION_ENV=$new_version" >> $GITHUB_ENV | ||
if [ -z "$new_version" ]; then | ||
echo "Failed to fetch the new version." | ||
exit 1 | ||
fi | ||
# Check if the version is already up-to-date | ||
if [ "$current_version" = "$new_version" ]; then | ||
echo "The package version is already up-to-date." | ||
exit 0 | ||
fi | ||
# Update requirements.txt | ||
sed -i "s/runpod==.*/runpod==$new_version/" ./builder/requirements.txt | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
commit-message: Update package version | ||
title: Update runpod package version | ||
body: The package version has been updated to ${{ env.NEW_VERSION_ENV }} | ||
branch: runpod-package-update |
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,85 @@ | ||
name: CI | Test Worker | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
initialize_worker: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
id: ${{ steps.extract_id.outputs.runpod_job_id }} | ||
|
||
steps: | ||
- name: Deploy Worker | ||
id: deploy | ||
uses: fjogeleit/http-request-action@v1 | ||
with: | ||
url: "https://api.runpod.ai/v2/${{ secrets.RUNPOD_ENDPOINT }}/run" | ||
method: "POST" | ||
customHeaders: '{"Content-Type": "application/json"}' | ||
bearerToken: ${{ secrets.RUNPOD_API_KEY }} | ||
data: '{"input":{"github_pat": "${{ secrets.GH_PAT }}", "github_org":"${{ secrets.GH_ORG }}"}}' | ||
|
||
- name: Extract Job ID | ||
id: extract_id | ||
run: | | ||
ID=$(echo '${{ steps.deploy.outputs.response }}' | jq -r '.id') | ||
echo "::set-output name=runpod_job_id::$ID" | ||
run_tests: | ||
needs: initialize_worker | ||
runs-on: runpod | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up environment | ||
run: | | ||
rm -f /etc/apt/sources.list.d/*.list | ||
apt-get update -y | ||
apt-get upgrade -y | ||
apt-get install --yes --no-install-recommends sudo ca-certificates git wget curl bash libgl1 libx11-6 software-properties-common ffmpeg build-essential -y | ||
apt-get autoremove -y | ||
apt-get clean -y | ||
rm -rf /var/lib/apt/lists/* | ||
- name: Set up Python 3.10 & install dependencies | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10.12" | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r builder/requirements.txt | ||
- name: Fetch and run models | ||
run: | | ||
python builder/fetch_models.py | ||
- name: Execute Tests | ||
run: | | ||
python src/rp_handler.py --test_input='{"input": {"audio": "https://github.com/runpod-workers/sample-inputs/raw/main/audio/gettysburg.wav"}}' | ||
terminate_worker: | ||
if: ${{ always() && !success() }} | ||
needs: initialize_worker | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Shutdown Worker | ||
uses: fjogeleit/http-request-action@v1 | ||
with: | ||
url: "https://api.runpod.ai/v2/${{ secrets.RUNPOD_ENDPOINT }}/cancel/${{ needs.initialize_worker.outputs.id }}" | ||
method: "POST" | ||
customHeaders: '{"Content-Type": "application/json"}' | ||
bearerToken: ${{ secrets.RUNPOD_API_KEY }} |
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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
runpod==1.6.2 | ||
torch==2.0.0 | ||
torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118 | ||
faster-whisper==3.1.1 | ||
torch>=2 | ||
torchaudio>=2 | ||
faster-whisper==1.0.0 | ||
transformers | ||
pandas | ||
setuptools>=65 | ||
nltk | ||
whisperx |
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