diff options
| author | Pjotr Prins | 2026-03-27 09:42:50 +0100 |
|---|---|---|
| committer | Pjotr Prins | 2026-03-27 09:42:50 +0100 |
| commit | c70a27ae64463eac43f0e4421e9d8cce9d4200ba (patch) | |
| tree | 77eac89f290a53d061e4e284bab899640732e1e6 | |
| parent | 115b0cbb783f9886aada63f8535096a7b4ea3b47 (diff) | |
| download | genecup-c70a27ae64463eac43f0e4421e9d8cce9d4200ba.tar.gz | |
Update (docs+guix) to run a guix container
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | Readme.md | 10 | ||||
| -rw-r--r-- | guix.scm | 48 |
3 files changed, 42 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore index 333d6a6..6bb15bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .key +instance settings.sh +minipubmed diff --git a/Readme.md b/Readme.md index ef25739..42ac577 100644 --- a/Readme.md +++ b/Readme.md @@ -37,7 +37,15 @@ For testing or code development, it is useful to have a small collection of PubM ``` cd minipubmed -cat pmid.list |fetch-PubMed -path PubMed/Archive/ >test.xml +cat pmid.list |fetch-pubmed -path PubMed/Archive/ >test.xml ``` You should see 2473 abstracts in the test.xml file. + +# Run the server + +You can use the [guix.scm](./guix.scm) container to run genecup: + +```sh +GeneCup$ guix shell -L . -C -N -F genecup-gemini coreutils edirect -- env EDIRECT_PUBMED_MASTER=./minipubmed GEMINI_API_KEY="AIza****" ./server.py --port 4201 +``` diff --git a/guix.scm b/guix.scm index 6915ba3..a4495a9 100644 --- a/guix.scm +++ b/guix.scm @@ -11,6 +11,10 @@ ;; guix shell -L ../guix-bioinformatics -L ../guix-past/modules \ ;; -L ../guix-rust-past-crates/modules -D -f guix.scm ;; +;; Run in shell +;; +;; . ./settings.sh && ./server.py +;; (define-module (guix) #:use-module ((guix licenses) #:prefix license:) @@ -33,7 +37,9 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages python-check) #:use-module (gnu packages python-build) + #:use-module (gnu packages nss) #:use-module (gnu packages time) + #:use-module (gnu packages tls) #:use-module (gn packages javascript) #:use-module (gn packages web)) @@ -54,7 +60,8 @@ (list #:tests? #f)) ; tests require network access and API keys (propagated-inputs - (list python-google-auth + (list python + python-google-auth python-httpx python-pydantic python-requests @@ -62,7 +69,8 @@ python-websockets python-typing-extensions python-distro - python-sniffio)) + python-sniffio + sed)) (native-inputs (list python-setuptools python-wheel)) @@ -72,10 +80,10 @@ access to Gemini models.") (license license:asl2.0))) -(define-public genecup +(define-public genecup-gemini (package - (name "genecup") - (version "0.0.1") + (name "genecup-gemini") + (version "1.9") (source (local-file %source-dir #:recursive? #t)) (build-system python-build-system) (arguments @@ -85,9 +93,9 @@ access to Gemini models.") #~(modify-phases %standard-phases (delete 'configure) (delete 'build) - (add-after 'unpack 'make-files-writable - (lambda _ - (for-each make-file-writable (find-files ".")))) + ;; (add-after 'unpack 'make-files-writable + ;; (lambda _ + ;; (for-each make-file-writable (find-files ".")))) (add-after 'unpack 'patch-sources (lambda* (#:key inputs outputs #:allow-other-keys) (let ((inetutils (assoc-ref inputs "inetutils"))) @@ -156,19 +164,25 @@ access to Gemini models.") ,(dirname (which "grep")) ,(dirname (which "sed")))) `("GUIX_PYTHONPATH" ":" prefix (,path))))))))) + (propagated-inputs + (list + python-bcrypt + python-dotenv + python-flask + python-flask-sqlalchemy + python-google-genai + python-nltk + python-pandas + python-pytz + python + nss-certs + openssl + )) (inputs `(("edirect" ,edirect) ("inetutils" ,inetutils) ("gzip" ,gzip) ("tar" ,tar) - ("python-bcrypt" ,python-bcrypt) - ("python-dotenv" ,python-dotenv) - ("python-flask" ,python-flask) - ("python-flask-sqlalchemy" ,python-flask-sqlalchemy) - ("python-google-genai" ,python-google-genai) - ("python-nltk" ,python-nltk) - ("python-pandas" ,python-pandas) - ("python-pytz" ,python-pytz) ;; JavaScript assets symlinked into static/ ("bootstrap" ,web-bootstrap) ("cytoscape" ,javascript-cytoscape-3.17) @@ -184,4 +198,4 @@ the NHGRI-EBI GWAS catalog on the relationship of any gene with a custom list of keywords hierarchically organized into an ontology.") (license license:expat))) -genecup +genecup-gemini |
