diff --git a/colab_demo.ipynb b/colab_demo.ipynb index 3b89765..f07a1a7 100644 --- a/colab_demo.ipynb +++ b/colab_demo.ipynb @@ -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\")" ] }, { @@ -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 -} \ No newline at end of file +}