diff options
| author | Pjotr Prins | 2026-03-28 08:59:07 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-28 08:59:07 +0100 |
| commit | 200acb601c4a271cf3be7d8651e80b28f55309d2 (patch) | |
| tree | f7c9c98a41cf56779a1060bdbbe9b7d65d77c285 | |
| parent | 976a1e4db165d967ed9ac2df8d9e02b3e77aff8b (diff) | |
| download | genecup-200acb601c4a271cf3be7d8651e80b28f55309d2.tar.gz | |
GENECUP_DATADIR configures sqlite DB location
| -rw-r--r-- | README.md | 11 | ||||
| -rwxr-xr-x | server.py | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/README.md b/README.md index c8a18a8..2088fc9 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ Note that the build includes minipubmed and punkt for testing! - Following the instruction provided by NCBI: https://www.nlm.nih.gov/dataguide/edirect/archive.html -Point environment variables to this dir. +Point environment variables to this dir: ``` env EDIRECT_PUBMED_MASTER=/export3/PubMed GEMINI_API_KEY="AIzaSy**" `guix build -L . genecup-gemini`/server.py --port 4201 ``` -Even better you can run from a container: +You can run from a proper container: ``` guix shell -L . -C -N -F genecup-gemini coreutils -- env GEMINI_API_KEY="AIzaSy**" genecup --port 4201 @@ -56,9 +56,10 @@ guix shell -L . -C -N -F genecup-gemini coreutils -- env GEMINI_API_KEY="AIzaSy* Environment variables used: ``` -EDIRECT_PUBMED_MASTER -GEMINI_API_KEY -NLTK_DATA +EDIRECT_PUBMED_MASTER: PubMed datadir +GEMINI_API_KEY: LLM access key +GENECUP_DATADIR: SQLITE DB directory +NLTK_DATA: punkt directory TMPDIR ``` diff --git a/server.py b/server.py index bd3bd57..b1a7404 100755 --- a/server.py +++ b/server.py @@ -70,9 +70,7 @@ def version(): app=Flask(__name__) -#datadir="/export/ratspub/" -#datadir = "." -datadir="./" +datadir=os.environ.get("GENECUP_DATADIR", "./") app.config['SECRET_KEY'] = '#DtfrL98G5t1dC*4' app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'+datadir+'userspub.sqlite' |
