forked from vishakha-lall/MapBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing the StanfordCoreNLP pre-requisite when using Docker vishakha…
…-lall#99 resolved (vishakha-lall#104) * handled env file paths and templates * SCNLP pre-requisite removed; fixes vishakha-lall#99 * changed setup instructions in README.md
- Loading branch information
1 parent
dbdc69c
commit eafbd37
Showing
8 changed files
with
59 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DB_USER=root | ||
DB_PASSWORD=<YOUR_MYSQL_ROOT_USER_PASSWORD_HERE> | ||
DB_HOST=localhost | ||
DATABASE=mapbot | ||
DB_PORT=3306 | ||
GCLOUD_API_KEY=<YOUR_API_KEY_HERE> | ||
JAVAHOME=<YOUR_JAVAHOME_PATH_HERE> | ||
STANFORD_PATH_TO_JAR=<YOUR_STANFORD_PATH_TO_JAR_HERE> | ||
STANFORD_PATH_TO_MODELS_JAR=<YOUR_STANFORD_PATH_TO_MODELS_JAR_HERE> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DB_USER=root | ||
DB_PASSWORD=root | ||
DB_HOST=db | ||
DATABASE=mapbot | ||
DB_PORT=3306 | ||
GCLOUD_API_KEY=<YOUR_API_KEY_HERE> | ||
JAVAHOME=/usr/local/openjdk-11/bin/java | ||
STANFORD_PATH_TO_JAR=./stanford-corenlp-full-2018-10-05/stanford-corenlp-3.9.2.jar | ||
STANFORD_PATH_TO_MODELS_JAR=./stanford-corenlp-full-2018-10-05/stanford-corenlp-3.9.2-models.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,25 @@ | ||
import os | ||
import dotenv | ||
from dotenv import load_dotenv | ||
|
||
dotenv.load_dotenv() | ||
if os.getenv("DOCKER") == 'Y': | ||
load_dotenv('ENV/docker.env') | ||
else: | ||
load_dotenv('ENV/.env') | ||
|
||
user = os.getenv('mapbotuser') | ||
password = os.getenv('mapbotpassword') | ||
host = os.getenv('mapbothost') | ||
database = os.getenv('mapbotdatabase') | ||
port = os.getenv('mapbotport') | ||
key = os.getenv('mapbotkey') | ||
### MAKE SURE you have filled environment variables in `.env` files in `./ENV/` folder | ||
|
||
stanford_path_to_jar = os.getenv('stanford_path_to_jar') | ||
user = os.getenv("DB_USER") | ||
password = os.getenv("DB_PASSWORD") | ||
host = os.getenv("DB_HOST") | ||
database = os.getenv("DATABASE") | ||
port = os.getenv("DB_PORT") | ||
key = os.getenv("GCLOUD_API_KEY") # Will be provided by mentors | ||
|
||
stanford_path_to_models_jar = os.getenv('stanford_path_to_models_jar') | ||
# your_path_to_stanford-corenlp-x.x.x.jar | ||
stanford_path_to_jar = os.getenv("STANFORD_PATH_TO_JAR") | ||
|
||
javahome = os.getenv('javahome') | ||
# your_path_to_stanford-corenlp-x.x.x-models.jar | ||
stanford_path_to_models_jar = os.getenv("STANFORD_PATH_TO_MODELS_JAR") | ||
|
||
|
||
# DONOT CHANGE THE VALUES BELOW DURING INITIAL CONFIGURATION SET UP | ||
|
||
docker = os.getenv("DOCKER") | ||
if(docker=="Y"): | ||
# print("Inside Docker") | ||
user = os.getenv('dockeruser') | ||
password = os.getenv('dockerpassword') | ||
host = os.getenv('dockerhost') | ||
javahome = os.getenv('dockerjavahome') | ||
# for eg. 'C:\\Program\ Files\\Java\\jdk1.8.0_201\\bin\\java.exe' or '/usr/local/openjdk-11/bin/java' | ||
javahome = os.getenv("JAVAHOME") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
set -ex | ||
|
||
if [ ! -d ./stanford-corenlp-full-2018-10-05 ]; then | ||
wget http://nlp.stanford.edu/software/stanford-corenlp-full-2018-10-05.zip -nc -c | ||
fi | ||
|
||
if [ -f stanford-corenlp-full-2018-10-05.zip ]; then | ||
unzip -n stanford-corenlp-full-2018-10-05.zip | ||
rm stanford-corenlp-full-2018-10-05.zip | ||
fi | ||
|
||
python init.py |
This file was deleted.
Oops, something went wrong.