From 5867d017d8a4477a5516cee04ca9f10efb8c9f58 Mon Sep 17 00:00:00 2001 From: Jason Antic Date: Sun, 18 Nov 2018 23:02:08 -0800 Subject: [PATCH] Removing pytorch from requirements.txt and setup --- DeOldify_colab.ipynb | 18 ++++++++++++++++++ requirements.txt | 3 +-- setup.py | 2 +- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/DeOldify_colab.ipynb b/DeOldify_colab.ipynb index 289a3cd..5846cb7 100644 --- a/DeOldify_colab.ipynb +++ b/DeOldify_colab.ipynb @@ -49,6 +49,24 @@ "!git clone https://github.com/jantic/DeOldify.git DeOldify" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from os import path\n", + "from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag\n", + "platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())\n", + "\n", + "accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'\n", + "\n", + "!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.4.1-{platform}-linux_x86_64.whl torchvision\n", + "import torch\n", + "print(torch.__version__)\n", + "print(torch.cuda.is_available())" + ] + }, { "cell_type": "code", "execution_count": null, diff --git a/requirements.txt b/requirements.txt index 59adea7..1587c18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -28,12 +28,11 @@ pandas>=0.20.3 pexpect>=4.2.1 pickleshare>=0.7.4 Pillow==4.1.1 -prompt-toolkit>=1.0.15 +prompt-toolkit==2.0.0 Pygments>=2.2.0 pyparsing>=2.2.0 pytest>=3.5.0 python-dateutil>=2.6.1 -pytorch>=0.4.1 pytz>=2017.2 PyYAML>=3.12 pyzmq>=16.0.2 diff --git a/setup.py b/setup.py index c3ae417..053590e 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ setup( 'ipykernel', 'ipython', 'ipython-genutils', 'ipywidgets', 'isoweek', 'jedi', 'Jinja2', 'jsonschema', 'jupyter', 'MarkupSafe', 'matplotlib', 'numpy', 'opencv-python', 'pandas', 'pandas_summary', 'pickleshare', 'Pillow', 'plotnine', - 'pytorch', 'Pygments', 'pyparsing', 'python-dateutil', 'pytz', 'PyYAML', 'pyzmq', 'scipy', + 'Pygments', 'pyparsing', 'python-dateutil', 'pytz', 'PyYAML', 'pyzmq', 'scipy', 'seaborn', 'simplegeneric', 'sklearn_pandas', 'testpath', 'torchtext', 'torchvision', 'tornado', 'tqdm', 'traitlets', 'wcwidth', 'webencodings', 'widgetsnbextension'], keywords = ['deeplearning', 'pytorch', 'machinelearning'],