Skip to content

Commit 14271d6

Browse files
authored
added apple silicon installation (#1193)
1 parent 61e8077 commit 14271d6

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

docs/en/licensed_install.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,75 @@ conda activate sparknlp
353353
jupyter notebook
354354
```
355355

356+
## Apple Silicon Support
357+
358+
**Installation for Apple Silicon (M1, M2, M3)**: Starting from version 4.0.0, Spark NLP has experimental support for apple silicon.
359+
360+
Make sure the following prerequisites are set:
361+
362+
1. Installing SDKMAN, you can also follow the official documentation at https://sdkman.io/install
363+
- `$ curl -s "https://get.sdkman.io" | bash`
364+
- `source "$HOME/.sdkman/bin/sdkman-init.sh"`
365+
- `sdk list java`
366+
list available java libraries:
367+
368+
![image](https://github.com/JohnSnowLabs/spark-nlp-workshop/assets/64752006/9d05bd11-14c5-454e-bbab-fea4e91da905)
369+
370+
371+
2. Installing Java
372+
- `sdk install java 8.0.402-amzn`
373+
- `whereis java`
374+
- `java -version`
375+
376+
3. Installing MiniConda, you can also follow the official documentation at https://docs.anaconda.com/free/miniconda/#quick-command-line-install
377+
- `mkdir -p ~/miniconda3`
378+
- `curl https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-2-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh` PS: you can change python version to 3.10 or 3.11
379+
- `bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3`
380+
- `~/miniconda3/bin/conda init bash`
381+
- `~/miniconda3/bin/conda init zsh`
382+
- `source miniconda3/bin/activate`
383+
384+
4. Installing `jupyter environments` or you can install it via `VSCode`
385+
386+
```bash
387+
# use base environment
388+
conda --version
389+
java -version
390+
conda activate
391+
pip install pyspark==3.4.0
392+
pip install jupyter
393+
conda env config vars set PYSPARK_PYTHON=python
394+
conda activate
395+
conda env config vars set PYSPARK_DRIVER_PYTHON=jupyter
396+
conda activate
397+
conda env config vars set PYSPARK_DRIVER_python_OPTS=notebook
398+
conda activate
399+
jupyter notebook
400+
```
401+
402+
```bash
403+
# or create new sparknlp environment
404+
conda --version
405+
java -version
406+
conda create -n sparknlp python=3.9 -y
407+
conda activate sparknlp
408+
pip install pyspark==3.4.0
409+
pip install jupyter
410+
conda env config vars set PYSPARK_PYTHON=python
411+
conda activate sparknlp
412+
conda env config vars set PYSPARK_DRIVER_PYTHON=jupyter
413+
conda activate sparknlp
414+
conda env config vars set PYSPARK_DRIVER_python_OPTS=notebook
415+
conda activate sparknlp
416+
jupyter notebook
417+
```
418+
419+
5. Installing Spark NLP Healthcare
420+
421+
please see the [Spark NLP Healthcare Installation Notebook](https://github.com/JohnSnowLabs/spark-nlp-workshop/blob/master/platforms/apple-silicon/installation.ipynb)
422+
423+
424+
356425

357426
## Non-johnsnowlabs Clinical NLP on Ubuntu
358427
> These instructions use non-johnsnowlabs installation syntax. For simplified installation with `johnsnowlabs` library, check first section.

0 commit comments

Comments
 (0)