Skip to content

Commit

Permalink
Revert "Update pre_colab.yml"
Browse files Browse the repository at this point in the history
This reverts commit 812456e.
  • Loading branch information
Vidalnt committed Sep 8, 2024
1 parent acff2f5 commit 9ed88e4
Showing 1 changed file with 55 additions and 29 deletions.
84 changes: 55 additions & 29 deletions .github/workflows/pre_colab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,60 +4,86 @@ on:
workflow_dispatch:

jobs:
Windows:
runs-on: windows-latest
Kaggle:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
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: Install dependencies
run: |
.\run-install.bat
.\env\python.exe core.py "prerequisites" --models "True" --pretraineds_v1 "False" --pretraineds_v2 "True" --exe "True"
- name: Clean up unnecessary files
run: |
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
id: get-version
run: |
$version = (Get-Content -Path './assets/config.json' | ConvertFrom-Json).version
echo "version=$version" >> $env:GITHUB_OUTPUT
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
wget https://huggingface.co/vidalnt/env/resolve/main/bin_kaggle.tar.gz?download=true -O bin_kaggle.tar.gz
tar -xzf bin_kaggle.tar.gz
cp -r bin/* .venv/bin/
rm -rf bin
rm bin_kaggle.tar.gz
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 ZIP file
- name: Create TAR Env
run: |
$version = '${{ steps.get-version.outputs.version }}'
Compress-Archive -Path 'D:\a\Applio\Applio\*' -DestinationPath "D:\a\Applio\ApplioV$version.zip"
tar --use-compress-program="pigz --best --recursive | pv" -cvf KaggleV2.tar.gz .venv
- name: Upload Windows Compiled
- name: Upload Kaggle Env
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
version: ${{ steps.get-version.outputs.version }}
run: |
.\env\python.exe -c "
python -c "
import os
from huggingface_hub import login, upload_file
token = os.getenv('HF_TOKEN')
version = os.getenv('version')
login(token)
repo_id = 'vidalnt/nothing'
repo_file_path = f'D:/a/Applio/ApplioV{version}.zip'
repo_id = 'IAHispano/Applio'
repo_file_path = 'KaggleV2.tar.gz'
upload_file(
commit_message=f'{version}',
path_or_fileobj=repo_file_path,
path_in_repo=f'Compiled/Windows/ApplioV{version}.zip',
path_in_repo=f'Enviroment/Kaggle/{repo_file_path}',
repo_id=repo_id,
token=token)
"

0 comments on commit 9ed88e4

Please sign in to comment.