Skip to content

Commit

Permalink
Add PreCompiled Kaggle
Browse files Browse the repository at this point in the history
- An unnecessary line was removed from release.yml
  • Loading branch information
Vidalnt committed Sep 5, 2024
1 parent 48a134b commit 17cdb46
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 7 deletions.
82 changes: 81 additions & 1 deletion .github/workflows/pre_compiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Clean up unnecessary files
run: |
Remove-Item -Path 'LICENSE', 'run-install.bat', 'requirements.txt', '.gitignore' -Force -ErrorAction SilentlyContinue
Remove-Item -Path 'LICENSE', 'run-tensorboard.sh', 'run-install.sh', 'run-applio.sh', 'run-install.bat', 'requirements.txt', '.gitignore' -Force -ErrorAction SilentlyContinue
Remove-Item -Path '.github' -Recurse -Force -ErrorAction SilentlyContinue
- name: Read version from config.json
Expand Down Expand Up @@ -66,6 +66,86 @@ jobs:
token=token)
"
Kaggle:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10.12"]

steps:
- uses: actions/checkout@v3

- name: Free up space on runner
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Read version from config.json
id: get-version
run: |
version=$(jq -r '.version' assets/config.json)
echo "version=$version" >> $GITHUB_OUTPUT
- name: Install uv and create virtual environment
run: |
sudo apt-get install -y pigz
sudo apt-get install -y pv
pip install uv huggingface_hub
uv venv .venv --python 3.10.12
uv pip install -r requirements.txt
uv pip install https://github.com/Vidalnt/imjoy-elfinder.git
uv pip uninstall torch torchvision torchaudio
. .venv/bin/activate
python -m ensurepip
python -m pip install "pip<24.1"
python -m pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
deactivate
rm -f .venv/pyvenv.cfg
rm -f .venv/bin/activate
rm -f .venv/bin/activate.bat
rm -f .venv/bin/activate.csh
rm -f .venv/bin/activate.fish
rm -f .venv/bin/activate.nu
rm -f .venv/bin/activate.ps1
rm -f .venv/bin/activate_this.py
rm -f .venv/bin/deactivate.bat
rm -f .venv/bin/pydoc.bat
rm -f .venv/bin/python
rm -f .venv/bin/python3
rm -f .venv/bin/python3.10
- name: Create TAR Env
run: |
tar --use-compress-program="pigz --best --recursive | pv" -cvf KaggleV2.tar.gz .venv
- name: Upload Kaggle Env
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
python -c "
import os
from huggingface_hub import login, upload_file
token = os.getenv('HF_TOKEN')
login(token)
repo_id = 'IAHispano/Applio'
repo_file_path = 'KaggleV2.tar.gz'
upload_file(
path_or_fileobj=repo_file_path,
path_in_repo=f'Enviroment/Kaggle/{repo_file_path}',
repo_id=repo_id,
token=token)
"
Colab:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ jobs:
with:
python-version: "3.8"

- name: Check if there is a parent commit
id: check-parent-commit
run: |
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $env:GITHUB_OUTPUT
- name: Detect and tag new version
id: check-version
if: steps.check-parent-commit.outputs.sha
uses: salsify/[email protected]
with:
tag-template: '{VERSION}'
Expand Down

0 comments on commit 17cdb46

Please sign in to comment.