Skip to content

Commit

Permalink
Update pre_colab.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Vidalnt committed Sep 8, 2024
1 parent 9ed88e4 commit 9466cea
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions .github/workflows/pre_colab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
workflow_dispatch:

jobs:
Kaggle:
Linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10.12"]
python-version: ["3.10"]

steps:
- uses: actions/checkout@v3
Expand All @@ -35,55 +35,49 @@ jobs:
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
sudo apt-get install -y ffmpeg
pip install virtualenv huggingface_hub
virtualenv .venv --python 3.10
source .venv/bin/activate
python -m pip install "pip<24.1"
python -m pip install -r requirements.txt
python -m pip uninstall torch torchvision torchaudio -y
python -m pip install torch==2.1.1 torchvision==0.16.1 torchaudio==2.1.1 --index-url https://download.pytorch.org/whl/cu121
python core.py "prerequisites" --models "True" --pretraineds_v1 "False" --pretraineds_v2 "True" --exe "False"
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 TAR Env
- name: Clean up unnecessary files
run: |
tar --use-compress-program="pigz --best --recursive | pv" -cvf KaggleV2.tar.gz .venv
rm -f LICENSE run-tensorboard.bat run-install.bat run-applio.bat run-install.sh requirements.txt .gitignore
rm -rf .github
- name: Modify pyvenv.cfg
run: |
sed -i '/^prompt = Applio/d' .venv/pyvenv.cfg
- name: Create ZIP file
run: |
zip -9 -r ApplioV${{ steps.get-version.outputs.version }}.zip .
- name: Upload Kaggle Env
- name: Upload Linux Compiled
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
version: ${{ steps.get-version.outputs.version }}
run: |
python -c "
import os
from huggingface_hub import login, upload_file
token = os.getenv('HF_TOKEN')
version = os.getenv('version')
login(token)
repo_id = 'IAHispano/Applio'
repo_file_path = 'KaggleV2.tar.gz'
repo_id = 'vidalnt/nothing'
repo_file_path = f'ApplioV{version}.zip'
upload_file(
commit_message=f'{version}',
path_or_fileobj=repo_file_path,
path_in_repo=f'Enviroment/Kaggle/{repo_file_path}',
path_in_repo=f'Compiled/Linux/ApplioV{version}.zip',
repo_id=repo_id,
token=token)
"

0 comments on commit 9466cea

Please sign in to comment.