You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script will install `Spark NLP`, `Spark NLP for Healthcare`, `Spark OCR`, `NLU` and `Spark NLP Display` on the specified virtual environment. It will also create a special folder, `./JohnSnowLabs`, dedicated to all resources necessary for using the libraries. Under `./JohnSnowLabs/example_notebooks` you will find some ready to use example notebooks that you can use to test the libraries on your data.
23
+
22
24
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
25
+
-`-h` show brief help
26
+
-`-i` install mode: create a virtual environment and install the library
27
+
-`-r` run mode: start jupyter after installation of the library
28
+
-`-v` path to virtual environment (default: ./sparknlp_env)
29
+
-`-j` path to license json file for Spark NLP for Healthcare
30
+
-`-o` path to license json file for Spark OCR
31
+
-`-a` path to a single license json file for both Spark OCR and Spark NLP
32
+
-`-s` specify pyspark version
33
+
-`-p` specify port of jupyter notebook
34
+
35
+
Use the `-i` flag for installing the libraries in a new virtual environment.
32
36
33
-
Use the -i flag for installing the libraries in a new virtual environment.
37
+
You can provide the desired path for virtual env using `-v` flag, otherwise a default location of `./sparknlp_env` will be selected.
34
38
35
-
You can provide the desired path for virtual env using -v flag, otherwise a default location of ./sparknlp_env will be selected.
39
+
The `PATH_TO_LICENSE_JSON_FILE` parameter must be replaced with the path where the license file is available on the local machine. According to the libraries you want to use different flags are available: `-j`, `-o` or `-a`. The license files can be easily downloaded from *My Subscription* section in your [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/) account.
36
40
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.
41
+
To start using Jupyter Notebook after the installation of the libraries use the `-r` flag.
38
42
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.
43
+
The install script downloads a couple of example notebooks that you can use to start experimenting with the libraries. Those will be availabe under `./JohnSnowLabs/example_notebooks` folder.
40
44
41
45
42
-
## Install NLP Libraries via Docker
46
+
## Install via Docker
43
47
44
-
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.
48
+
A docker image that contains all the required libraries for installing and running Spark NLP for Healthcare is also available. However, it does not contain the library itself, as it is licensed, and requires installation credentials.
45
49
46
-
Make sure you have valid license for Spark NLP for Healthcare, and follow the instructions below:
50
+
Make sure you have a valid license for Spark NLP for Healthcare (in case you do not have one, you can ask for a trial [here](https://www.johnsnowlabs.com/install/) ), and follow the instructions below:
47
51
48
52
49
53
### Instructions
50
54
51
-
- Run the following commands to download the docker-compose.yml and the sparknlp_keys.txt files on your local machine:
55
+
- Run the following commands to download the `docker-compose.yml` and the `sparknlp_keys.txt` files on your local machine:
- Download your license key in json format from my.johnsnowlabs.com
57
-
- Populate License keys in sparknlp_keys.txt.
60
+
61
+
- Download your license key in json format from [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/)
62
+
- Populate License keys in `sparknlp_keys.txt` file.
58
63
- Run the following command to run the container in detached mode:
64
+
59
65
```bash
60
66
docker-compose up -d
61
67
```
62
-
- By default, the jupyter notebook would run at port 8888 - you can access the notebook by typing localhost:8888 in your browser.
68
+
- By default, the jupyter notebook runs on port `8888` - you can access it by typing `localhost:8888` in your browser.
63
69
64
70
65
71
### Troubleshooting
66
72
67
73
- Make sure docker is installed on your system.
68
74
- If you face any error while importing the lib inside jupyter, make sure all the credentials are correct in the key files and restart the service again.
69
-
- If the default port 8888 is already occupied by another process, please change the mapping.
70
-
- You can change/adjust volume and port mapping in the docker-compose.yml file.
75
+
- If the default port `8888` is already occupied by another process, please change the mapping.
76
+
- You can change/adjust volume and port mapping in the `docker-compose.yml` file.
77
+
- You don't have a license key? Ask for a trial license [here](https://www.johnsnowlabs.com/install/).
`{version}` is the version part of the `{secret.code}` (`{secret.code}.split('-')[0]`) (i.e. `2.6.0`)
81
88
82
-
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 <ahref="mailto:[email protected]">[email protected]</a>.
89
+
The `{secret.code}` is a secret code that is only available to users with valid/trial license.
90
+
91
+
You can ask for a free trial for Spark NLP for Healthcare [here](https://www.johnsnowlabs.com/install/). Then, you can obtain the secret code by visiting your account on [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/). Read more on how to get a license [here](licensed_install#get-a-spark-nlp-for-healthcare-license).
83
92
84
93
85
94
### Setup AWS-CLI Credentials for licensed pretrained models
@@ -91,22 +100,23 @@ Instructions about how to install AWSCLI are available at:
91
100
92
101
<ahref="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html">Installing the AWS CLI</a>
93
102
94
-
Make sure you configure your credentials with aws configure following the instructions at:
103
+
Make sure you configure your credentials with AWS configure following the instructions at:
95
104
96
105
<ahref="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">Configuring the AWS CLI</a>
97
106
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 <ahref="mailto:info@johnsnowlabs.com">info@johnsnowlabs.com</a>.
107
+
Please substitute the `ACCESS_KEY` and `SECRET_KEY` with the credentials available on your license json file. This is available on your account from [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/). [Read this](licensed_install#get-a-spark-nlp-for-healthcare-license) for more information.
99
108
100
109
101
110
### Start Spark NLP for Healthcare Session from Python
102
111
103
-
The following will initialize the spark session in case you have run the jupyter notebook directly. If you have started the notebook using
112
+
The following will initialize the spark session in case you have run the Jupyter Notebook directly. If you have started the notebook using
104
113
pyspark this cell is just ignored.
105
114
106
115
Initializing the spark session takes some seconds (usually less than 1 minute) as the jar from the server needs to be loaded.
107
116
108
-
The `{secret-code}` is a secret string you should have received from your Customer Owner (CO). If you have
The `{secret.code}` is a secret code that is only available to users with valid/trial license.
118
+
119
+
You can ask for a free trial for Spark NLP for Healthcare [here](https://www.johnsnowlabs.com/install/). Then, you can obtain the secret code by visiting your account on [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/). Read more on how to get a license [here](licensed_install#get-a-spark-nlp-for-healthcare-license).
110
120
111
121
You can either use our convenience function to start your Spark Session that will use standard configuration arguments:
As you see, we did not set `.master('local[*]')` explicitly to let YARN manage the cluster.
402
-
Or you can set `.master('yarn')`.
413
+
Or you can set `.master('yarn')`.
414
+
415
+
416
+
## Get a Spark NLP for Healthcare license
417
+
418
+
You can ask for a free trial for Spark NLP for Healthcare [here](https://www.johnsnowlabs.com/install/). This will automatically create a new account for you on [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/). Login in to your new account and from `My Subscriptions` section, you can download your license key as a json file.
419
+
420
+
The license json file contains:
421
+
- the secrets for installing the Spark NLP for Healthcare and Spark OCR libraries,
422
+
- the license key as well as
423
+
- AWS credentials that you need to access the s3 bucket where the healthcare models and pipelines are published.
424
+
425
+
If you have asked for a trial license but you cannot access your account on [my.JohnSnowLabs.com](https://my.johnsnowlabs.com/) and you did not receive the license information via email, please contact us at <a href="mailto:[email protected]">[email protected]</a>.
0 commit comments