How to prepare fastai requirements for deployment


(Parthiban) #1

Hi

I am trying to deploy my fastai model here, but unsuccessful baby steps. Apart from main blocking issue 1, I tried removing all fastai torch in my conda in my local win 10 system, and then tried installing as below (which also goes in to requirements.txt)

numpy 
torchvision_nightly
-f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
fastai
zerorpc

However, when I execute below code, I get an error as below.

pip3 install -r requirements.txt

Error:

Collecting torch (from fastai->-r requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\PARTHI~1\AppData\Local\Temp\pip-install-x443heml\torch\setup.py", line 11, in <module>
        raise RuntimeError(README)
    RuntimeError: PyTorch does not currently provide packages for PyPI (see status at https://github.com/pytorch/pytorch/issues/566).

    Please follow the instructions at http://pytorch.org/ to install with miniconda instead.


    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\PARTHI~1\AppData\Local\Temp\pip-install-x443heml\torch\

I tried to install this way instead of conda installation (which is successful), because I wanted to be sure, if I only install what is in requirements.txt, my code runs. Kindly help.

I have Python 3.6.7 in Win 10.