How to install AutoKeras on aws-ec2

445 views Asked by At

I tried to install autokeras on aws ec2 (p2.xlarge) with the environment python 3.6 & tensorflow. I get following error after "pip install autokeras":

tensorflow 1.10.0 has requirement numpy<=1.14.5,>=1.13.3, but you'll have numpy 1.15.4 which is incompatible.
Installing collected packages: imageio, autokeras
Found existing installation: imageio 2.3.0
Cannot uninstall 'imageio'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

I uninstalled numpy 1.15.4 and installed numpy 1.14.5. With "conda list", I can see the numpy has the correct version.
But after "pip install autokeras" I get the same error and numpy 1.15.4 is still there.

Has anyone successfully installed autokeras on aws ec2? What shall I do to install autokeras correctly? (Maybe the 'imageio' is the next problem?)

Thank you!

1

There are 1 answers

0
Javi On

I think you need tensorflow 1.14. Here my notes for AutoKeras installation:

Autokeras Installation Notes in the Deep Learning AMI:

We launched a new deep learning AMI with ubuntu.

The deep learning AMI didn't worked using the "tensorflow + keras + py3.6" environment (so no need for a DL AMI probably, you can save space on disk using a normal clean AMI), so we managed o install autokeras doing the following:
  1. Create a new environment with Anaconda: $ conda create -n autokeras python=3.6.

    1.1. Remember that only python 3.6 is working with autokeras

  2. Activate virtual env: It didn't work $ conda activate autokeras, but it works using $ source activate autokeras.

  3. installation of all the packages as required by pyimagesearch.

    3.1. A new problem arised here, which, long story short, was solved using the next post (note that I chenged the order, since urllib3 needs jsonschema to be installed first):

    $ pip uninstall urllib3```
    $ pip uninstall jsonschema
    $ pip install jsonschema==2.6.0
    $ pip install urllib3==1.24.1
    

    3.2. Finally I was able to install all 3 packages:

    $ pip install tensorflow # or tensorflow-gpu
    $ pip install keras
    $ pip install autokeras
    

    3.3. Autokeras worked fine at this point, but it raised a warning:

    >>> import autokeras
    Better speed can be achieved with apex installed from https://www.github.com/nvidia/apex
    

    So I just went to the webpage and followed the installation steps. Now it works without warnings (so far):

    $ git clone https://github.com/NVIDIA/apex
    $ cd apex
    $ pip install -v --no-cache-dir --global-option="--pyprof" --global-option="--cpp_ext" --global-option="--cuda_ext" ./