Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating colab to use poetry #107

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions colab_demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,27 @@
},
"outputs": [],
"source": [
"!pip install -r requirements.txt\n",
"!pip install --upgrade torch torchaudio"
"!sudo apt install pipx\n",
"!pipx install poetry\n",
"!pipx run poetry install && pipx run poetry run pip install torch==2.2.1 torchaudio==2.2.1\n",
"!pipx run poetry env list | sed 's/ (Activated)//' > poetry_env.txt\n",
"# NOTE: pip's dependency resolver will error & complain, ignore it!\n",
"# its due to a temporary dependency issue, `tts.synthesise` will still work as intended!"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"outputs": [],
"source": [
"import sys, pathlib\n",
"venv = pathlib.Path(\"poetry_env.txt\").read_text().strip(\"\\n\")\n",
"sys.path.append(f\"/root/.cache/pypoetry/virtualenvs/{venv}/lib/python3.10/site-packages\")"
]
},
{
Expand Down Expand Up @@ -91,19 +110,19 @@
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": [],
"gpuType": "T4"
"gpuType": "T4",
"provenance": []
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
}
Loading