diff --git a/.github/workflows/pre_colab.yml b/.github/workflows/pre_colab.yml index 2c4db8f89..1c5d2d25d 100644 --- a/.github/workflows/pre_colab.yml +++ b/.github/workflows/pre_colab.yml @@ -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 @@ -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) " \ No newline at end of file