From 05c5e9696f24e6c0d95190048bd201e831208656 Mon Sep 17 00:00:00 2001 From: Mark Hamilton Date: Thu, 28 Jun 2018 11:47:22 +0000 Subject: [PATCH] fixes for docker notebooks --- notebooks/samples/304 - Medical Entity Extraction.ipynb | 5 ++--- tools/docker/bin/launcher | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/notebooks/samples/304 - Medical Entity Extraction.ipynb b/notebooks/samples/304 - Medical Entity Extraction.ipynb index 852dd64771..243a582332 100644 --- a/notebooks/samples/304 - Medical Entity Extraction.ipynb +++ b/notebooks/samples/304 - Medical Entity Extraction.ipynb @@ -80,12 +80,11 @@ "outputs": [], "source": [ "modelName = \"BiLSTM\"\n", - "modelDir = \"models\"\n", + "modelDir = abspath(\"models\")\n", "if not os.path.exists(modelDir): os.makedirs(modelDir)\n", "d = ModelDownloader(spark, \"file://\" + modelDir)\n", "modelSchema = d.downloadByName(modelName)\n", - "nltk.download(\"punkt\", download_dir=modelDir)\n", - "nltk.data.path.append(modelDir)" + "nltk.download(\"punkt\")" ] }, { diff --git a/tools/docker/bin/launcher b/tools/docker/bin/launcher index ca060c014c..3301ec53f9 100755 --- a/tools/docker/bin/launcher +++ b/tools/docker/bin/launcher @@ -23,4 +23,4 @@ fi PYSPARK_DRIVER_PYTHON="jupyter" \ PYSPARK_DRIVER_PYTHON_OPTS="notebook --no-browser --port=$port --ip=*" \ - pyspark --master "local[*]" --repositories "$MML_M2REPOS" --packages "$MML_PACKAGE" + pyspark --master "local[2]" --driver-memory 2g --executor-memory 4g --repositories "$MML_M2REPOS" --packages "$MML_PACKAGE"