Skip to content

Commit bc1c915

Browse files
authored
Merge pull request #6435 from JohnSnowLabs/docs/libs-install
added the NLP libs install script
2 parents 9a564ae + 0121883 commit bc1c915

File tree

1 file changed

+44
-12
lines changed

1 file changed

+44
-12
lines changed

docs/en/licensed_install.md

Lines changed: 44 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,35 @@ sidebar:
1111
nav: sparknlp-healthcare
1212
---
1313

14-
## Install via Docker
14+
## Install NLP libraries on Ubuntu
15+
16+
For installing John Snow Labs NLP on an Ubuntu machine/VM please run the following command:
17+
18+
```bash
19+
wget https://setup.johnsnowlabs.com/nlp/install.sh -O - | sudo bash -s -- -a PATH_TO_LICENSE_JSON_FILE -i -r
20+
```
21+
22+
The install script offers several options:
23+
- *-h* show brief help
24+
- *-i* install mode: create a virtual environment and install the library
25+
- *-r* run mode: start jupyter after installation of the library
26+
- *-v* path to virtual environment (default: ./sparknlp_env)
27+
- *-j* path to license json file for Spark NLP for Healthcare
28+
- *-o* path to license json file for Spark OCR
29+
- *-a* path to a single license json file for both Spark OCR and Spark NLP
30+
- *-s* specify pyspark version
31+
- *-p* specify port of jupyter notebook
32+
33+
Use the -i flag for installing the libraries in a new virtual environment.
34+
35+
You can provide the desired path for virtual env using -v flag, otherwise a default location of ./sparknlp_env will be selected.
36+
37+
The PATH_TO_LICENSE_JSON_FILE must be replaced to the path where the license file is available on the local machine. According to the libraries you want to use you have different flags: -j, -o, -a. The license files can be easily downloaded from *My Subscription* section in your my.JohnSnowLabs.com account.
38+
39+
To directly start using Jupyter Notebook after the installation of the libraries user the -r flag. The install script downloads a couple of ready to use example notebooks that you can use to start experimenting with the libraries.
40+
41+
42+
## Install NLP Libraries via Docker
1543

1644
We have prepared a docker image that contains all the required libraries for installing and running Spark NLP for Healthcare. However, it does not contain the library itself, as it is licensed, and requires installation credentials.
1745

@@ -54,8 +82,6 @@ pip install -q spark-nlp-jsl==${version} --extra-index-url https://pypi.johnsnow
5482
The `{secret.code}` is a secret code that is only available to users with valid/trial license. If you did not receive it yet, please contact us at <a href="mailto:[email protected]">[email protected]</a>.
5583

5684

57-
</div><div class="h3-box" markdown="1">
58-
5985
### Setup AWS-CLI Credentials for licensed pretrained models
6086

6187
Starting from Spark NLP for Healthcare version 2.4.2, you need to first setup your AWS credentials to be able to access the private repository for John Snow Labs Pretrained Models.
@@ -69,10 +95,8 @@ Make sure you configure your credentials with aws configure following the instru
6995

7096
<a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">Configuring the AWS CLI</a>
7197

72-
Please substitute the `ACCESS_KEY` and `SECRET_KEY` with the credentials you have received from your Customer Owner (CO). If you need your credentials contact us at
73-
98+
Please substitute the `ACCESS_KEY` and `SECRET_KEY` with the credentials you have received from your Customer Owner (CO). If you need your credentials contact us at <a href="mailto:[email protected]">[email protected]</a>.
7499

75-
</div>
76100

77101
### Start Spark NLP for Healthcare Session from Python
78102

@@ -131,7 +155,7 @@ spark-submit --packages com.johnsnowlabs.nlp:spark-nlp_2.12:3.2.3 --jars spark-n
131155

132156
## Install locally for Scala
133157

134-
### Use spark-health-care in Spark shell
158+
### Use Spark NLP for Healthcare in Spark shell
135159

136160
1.Download the fat jar for spark-nlp-healthcare.
137161

@@ -153,7 +177,7 @@ aws s3 cp --region us-east-2 s3://pypi.johnsnowlabs.com/$jsl_secret/spark-nlp-js
153177
spark-shell --packages com.johnsnowlabs.nlp:spark-nlp_2.12:${public-version} --jars /spark-nlp-jsl-${version}.jar
154178
```
155179

156-
### Use spark-health-care in Sbt project
180+
### Use Spark NLP for Healthcare in Sbt project
157181

158182
1.Download the fat jar for spark-nlp-healthcare.
159183
```bash
@@ -185,6 +209,13 @@ unmanagedJars in Compile += file("lib/sparknlp-jsl.jar")
185209

186210
## Install on Databricks
187211

212+
### Automatic deployment of John Snow Labs NLP libraries
213+
214+
You can automatically deploy John Snow Labs libraries on Databricks by filling in the form available [here](https://www.johnsnowlabs.com/databricks/).
215+
This will allow you to start a 30-day free trial with no limit on the amount of processed data. You just need to provide a Databricks Access Token that is used by our deployment script to connect to your Databricks instance and install John Snow Labs NLP libraries on a cluster of your choice.
216+
217+
### Manual deployment of Spark NLP for Healthcare
218+
188219
1. Create a cluster if you don't have one already
189220
2. On a new cluster or existing one you need to add the following to the `Advanced Options -> Spark` tab, in `Spark.Config` box:
190221

@@ -232,11 +263,9 @@ unmanagedJars in Compile += file("lib/sparknlp-jsl.jar")
232263

233264

234265

235-
## Use on Google Colab Notebook
236-
237-
Google Colab is perhaps the easiest way to get started with spark-nlp. It requires no installation or setup other than having a Google account.
266+
## Use on Google Colab
238267

239-
Run the following code in Google Colab notebook and start using spark-nlp right away.
268+
Run the following code in Google Colab notebook and start using Spark NLP right away.
240269

241270
The first thing that you need is to create the json file with the credentials and the configuration in your local system.
242271

@@ -251,6 +280,9 @@ The first thing that you need is to create the json file with the credentials an
251280
}
252281
```
253282

283+
If you have a valid floating license, the license json file can be downloaded from your account on [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/) on **My Subscriptions** section. To get a trial license please visit
284+
285+
254286
Then you need to write that piece of code to load the credentials that you created before.
255287

256288
```python

0 commit comments

Comments
 (0)