From 71b401826d44d5298ef35caddb5b4ae119c71ad2 Mon Sep 17 00:00:00 2001 From: Adrian Wilke Date: Sat, 26 Feb 2022 13:51:50 +0100 Subject: [PATCH] re-deployed --- api/embeddings_cc_index_examples.py | 6 +++--- docs/vm.md | 6 +++++- scripts/vm-push.sh | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/api/embeddings_cc_index_examples.py b/api/embeddings_cc_index_examples.py index 77f1c4d..03739d5 100644 --- a/api/embeddings_cc_index_examples.py +++ b/api/embeddings_cc_index_examples.py @@ -87,11 +87,11 @@ # Line format: http://dbpedia.org/resource/E734345,0.4001125,[...],-0.015108802 # # Note: Adding 1,000 embeddings takes around 15 seconds -# time python3 api/embeddings_cc_index_examples.py -> 7m47,509s (Reading/parsing: 0m33,909s) +# time python3 api/embeddings_cc_index_examples.py -> 7m47,509s (Reading/parsing: ~33s) # time python3 api/embeddings_cc_index_examples.py 123 http://127.0.0.1:8008 -> 2m10,133s if False: csv_file = '/tmp/Shallom_entity_embeddings.csv' - es_index = 'dbpedia_en_fr_15k_v2_shallom' + es_index = 'dbpedia_en_fr_15k_v2_shallom___' max_docs = 100 * 1000 # Delete index @@ -141,4 +141,4 @@ def add_embeddings(api, password, index, embeddings): # Print number of documents response = embeddings_cc_index.count(es_index) - print(response.status_code, response.text) \ No newline at end of file + print(response.status_code, response.text) diff --git a/docs/vm.md b/docs/vm.md index 26f0fd2..8636671 100644 --- a/docs/vm.md +++ b/docs/vm.md @@ -49,7 +49,11 @@ - `kinit wilke` - `./scripts/vm-push.sh` - `ssh wilke@embeddings.cs.upb.de` + - `. /opt/bashrc.sh` - `sudo mv /tmp/embeddings.cc/ /opt/embeddings.cc/` + - `mkdir /opt/embeddings.cc/instance` + - `cp /opt/embeddings.cc/config.py /opt/` + - `ln -s /opt/config.py /opt/embeddings.cc/instance/config.py` - Anaconda environment - `conda create --name embeddings` - **`. /opt/anaconda3/etc/profile.d/conda.sh`** @@ -85,7 +89,7 @@ - `cd /opt/embeddings.cc/` - `. /opt/anaconda3/etc/profile.d/conda.sh` - `conda activate embeddings` -- `export FLASK_APP=webservice` +- `export FLASK_APP=webservice_public` - `export FLASK_RUN_PORT=8443` - `flask run --host=0.0.0.0` diff --git a/scripts/vm-push.sh b/scripts/vm-push.sh index b5aae9c..e6fd3cc 100755 --- a/scripts/vm-push.sh +++ b/scripts/vm-push.sh @@ -6,4 +6,4 @@ if ! test -f "README.md"; then exit fi -rsync -aP --exclude={'.git','instance','__pycache__','.*'} ./ wilke@embeddings.cs.uni-paderborn.de:/tmp/embeddings.cc +rsync -aP --exclude={'instance','__pycache__','.*'} ./ wilke@embeddings.cs.uni-paderborn.de:/tmp/embeddings.cc