-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* mongodb cache * logging * add mongo init at start of work * option to clear cache, better caching * cache more queries * more invariant deciding when to cache * cache if small result * cache all multi token queries * fix bug * fix crash because python * add json params to mongo clear to avoid crash * remove debug log message * set mongo timeout * exception handling * env * fix old typo * fix up server example * fix log statement in wrong place
- Loading branch information
Showing
10 changed files
with
141 additions
and
60 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
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,3 +1,8 @@ | ||
# change this to a directory on your local machine to store pubmed articles | ||
#PUBMED_DIR=./pubmed | ||
PUBMED_DIR=/path/to/my/PubmedAbstracts | ||
PUBMED_DIR=/path/to/my/PubmedAbstracts | ||
|
||
# password hash (password is 'password' by default; to change it, you need | ||
# to generate a hash yourself using bcrypt and put it here) | ||
# NOTE: I can't figure out how to use dollar signs in the hash. This is hacky, | ||
# but replace $ with ____ (four underscores). | ||
PASSWORD_HASH="____2b____12____YfgpDEOwxLy..UkZEe0H8.0aO/AQXpbsA4sAgZ9RWQShkG4iZYl16" |
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,30 +1,39 @@ | ||
version: "3.3" | ||
services: | ||
server: | ||
image: rmillikin/fast_km-server:dev | ||
image: rmillikin/fast_km-server:latest | ||
container_name: fast_km-server | ||
command: --pw ${PASSWORD_HASH} # edit .env file to change this | ||
ports: | ||
- "5000:5000" | ||
- "5099:5000" # HOST_PORT:CONTAINER_PORT | ||
depends_on: | ||
- redis | ||
resources: | ||
limits: | ||
cpus: '3.0' | ||
memory: '12gb' | ||
networks: | ||
- fast_km-network | ||
|
||
workers: | ||
image: rmillikin/fast_km-worker:dev | ||
command: python -u src/run_worker.py --workers 1 | ||
image: rmillikin/fast_km-worker:latest | ||
container_name: fast_km-worker | ||
command: --workers 3 | ||
volumes: | ||
- ${PUBMED_DIR}:/mnt/pubmed # edit .env file to change pubmed dir | ||
- ${PUBMED_DIR}:/mnt/pubmed # edit .env file to change this | ||
depends_on: | ||
- redis | ||
resources: | ||
limits: | ||
cpus: '10.0' | ||
memory: '128gb' | ||
networks: | ||
- fast_km-network | ||
|
||
mongo: | ||
image: mongo | ||
container_name: fast_km-mongo | ||
command: --quiet --logpath /dev/null | ||
networks: | ||
- fast_km-network | ||
|
||
redis: | ||
image: redis | ||
resources: | ||
limits: | ||
memory: '1gb' | ||
container_name: fast_km-redis | ||
networks: | ||
- fast_km-network | ||
|
||
networks: | ||
fast_km-network: |
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,42 +1,15 @@ | ||
aniso8601==9.0.1 | ||
arrow==1.2.0 | ||
attrs==21.2.0 | ||
certifi==2021.10.8 | ||
charset-normalizer==2.0.7 | ||
click==8.0.3 | ||
Flask==2.0.2 | ||
Flask-RESTful==0.3.9 | ||
idna==3.3 | ||
importlib-metadata==4.8.1 | ||
iniconfig==1.1.1 | ||
itsdangerous==2.0.1 | ||
Jinja2==3.0.2 | ||
joblib==1.1.0 | ||
MarkupSafe==2.0.1 | ||
nltk==3.6.5 | ||
numpy==1.21.2 | ||
packaging==21.0 | ||
pluggy==1.0.0 | ||
py==1.10.0 | ||
pygtrie==2.4.2 | ||
pyparsing==2.4.7 | ||
pytest==6.2.5 | ||
python-dateutil==2.8.2 | ||
pytz==2021.3 | ||
quickle==0.4.0 | ||
redis==3.5.3 | ||
regex==2021.10.8 | ||
requests==2.26.0 | ||
rq==1.10.0 | ||
rq-dashboard==0.6.1 | ||
scipy==1.7.1 | ||
shared-memory-dict==0.6.0 | ||
six==1.16.0 | ||
supervisor==4.2.2 | ||
toml==0.10.2 | ||
tqdm==4.62.3 | ||
typing-extensions==3.10.0.2 | ||
urllib3==1.26.7 | ||
Werkzeug==2.0.2 | ||
zipp==3.6.0 | ||
flask-bcrypt==0.7.1 | ||
flask-bcrypt==0.7.1 | ||
pymongo==4.0.1 | ||
Werkzeug==2.0.2 |
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
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
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