Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 7 additions & 6 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ install_requires =
gensim
pandas-datareader
pugnlp
tensorflow
tensorflow-metal
keras
regex
spacy
Expand Down Expand Up @@ -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]
Expand Down