diff --git a/README.md b/README.md index 9d55f04..7b3fb84 100644 --- a/README.md +++ b/README.md @@ -86,11 +86,11 @@ You have two alternative package managers you can use to install `nlpia`: 5.1. [`conda`](https://github.com/totalgood/nlpia/blob/master/README.md#alternative-51-conda) 5.2. [`pip`](https://github.com/totalgood/nlpia/blob/master/README.md#alternative-52-pip) +5.3. [`docker`](https://github.com/totalgood/nlpia/blob/master/README.md#alternative-53-docker) +5.4. [`miniforge`](https://github.com/totalgood/nlpia/blob/master/README.md#alternative-54-miniforge) A helpful [NLPIA](http://bit.ly/gh-readme-nlpia-book) reader, [Hoang Chung Hien](https://github.com/hoangchunghien), created a Dockerfile you can use for a third way to manage your environment: -5.3. [`docker`](https://github.com/totalgood/nlpia/blob/master/README.md#alternative-53-docker) - In most cases, `conda` will be able to install python packages faster and more reliably than `pip`. Without `conda` Some packages, such as `python-levenshtein`, require you to compile a C library during installation. Windows doesn't have a a compiler and python package installer that will "just work." #### Alternative 5.1. `conda` @@ -191,6 +191,25 @@ docker run -p 8888:8888 -v ~:/home/jovyan/work nlpia Then open a new notebook and test your code. Make sure save it inside `work` directory so it's accessible outside the container. + +## Alternative 5.4. `miniforge` + +### 5.4.1 Install Python3.9.5 and tensorflow-metal with miniforge + +Follow this [tutorial](https://makeoptim.com/en/deep-learning/tensorflow-metal) + +### 5.4.2 Install all requirements with pip + +Miniforge will give you a Python3.9.5 (or more) virtual environment, capable to run the accelerated tensorflow-metal , optimized to use the M1 integrated GPU hardware. + + cd nlpia + pip install -r requirements.txt + +### 5.4.3 Install nlpia + + python setup.py install + + ### 6. Have Fun! Check out the code examples from the book in `nlpia/nlpia/book/examples` to get ideas: diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 1e8423b..8e35931 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -2,7 +2,7 @@ AIML-Bot>=0.0.3,<0.1.0 coverage>=4.3.4 cython>=0.29.20 future>=0.16.0 -gensim==3.6.0 +gensim html2text>=2018.1.9 html5lib==1.1 jupyter>=1.0.0,<1.1.0 @@ -12,8 +12,8 @@ Keras-Preprocessing>=1.0.5 matplotlib>=3.2.2,<3.4.0 MechanicalSoup>=0.10.0,<0.11.0 nltk==3.5 -pandas>=0.25.3,<0.26.0 -pandoc==2.2.3.2 +pandas +pandoc pathlib>=1.0.1,<2.0.0 pillow==6.2.2 pip>=18.0 @@ -27,12 +27,13 @@ qtconsole==4.4.1. # ,<6.0.0 # 4.4.1 is available on OSX in conda and pip redis>=2.10.6,<2.11.0 regex>=2020.6.8 scikit-learn>=0.18.1 -scipy==1.4.1 +scipy seaborn>=0.8 setuptools>=40.8.0 -spacy==2.3.0 -tensorflow==2.1.0 +spacy +tensorflow-metal tensorflow-hub>=0.4.0 theano==1.0.2 tqdm>=4.11.2 wheel>=0.30.0a0 +ipdb diff --git a/setup.cfg b/setup.cfg index aa36c0b..5c08793 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ install_requires = gensim pandas-datareader pugnlp - tensorflow + tensorflow-metal keras regex spacy @@ -82,7 +82,7 @@ exclude = # Add here additional requirements for extra features, to install with: # `pip install nlpia[voice]` like: twitter = tweepy; twython -deep = keras; tensorflow; annoy; gensim +deep = keras; tensorflow-metal; annoy; gensim # voice = pyaudio; pocketsphinx; SpeechRecognition; pyttsx3; deepspeech chat = aichat; will; redis; ChatterBot; lxml; aiml; aichat all = nlpia[deep]; nlpia[chat]; nlpia[twitter]; nlpia[voice]