darabos commited on
Commit
5acf6e2
·
2 Parent(s): 316bd8a da17aaa

Merge branch 'main' into darabos-nx

Browse files
lynxkite-app/src/lynxkite_app/__main__.py CHANGED
@@ -6,7 +6,13 @@ import os
6
  def main():
7
  port = int(os.environ.get("PORT", "8000"))
8
  reload = bool(os.environ.get("LYNXKITE_RELOAD", ""))
9
- uvicorn.run("lynxkite_app.main:app", host="0.0.0.0", port=port, reload=reload)
 
 
 
 
 
 
10
 
11
 
12
  if __name__ == "__main__":
 
6
  def main():
7
  port = int(os.environ.get("PORT", "8000"))
8
  reload = bool(os.environ.get("LYNXKITE_RELOAD", ""))
9
+ uvicorn.run(
10
+ "lynxkite_app.main:app",
11
+ host="0.0.0.0",
12
+ port=port,
13
+ reload=reload,
14
+ loop="asyncio",
15
+ )
16
 
17
 
18
  if __name__ == "__main__":
lynxkite-graph-analytics/README.md CHANGED
@@ -11,3 +11,44 @@ pip install lynxkite lynxkite-graph-analytics
11
  ```
12
 
13
  Run LynxKite with `NX_CUGRAPH_AUTOCONFIG=True` to enable GPU-accelerated graph data science operations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ```
12
 
13
  Run LynxKite with `NX_CUGRAPH_AUTOCONFIG=True` to enable GPU-accelerated graph data science operations.
14
+
15
+
16
+ ## BioNemo
17
+
18
+ If you want to use BioNemo operations, then you will have to use the provided Docker image, or
19
+ install BioNemo manually in your environment.
20
+ Take into account that BioNemo needs a GPU to work, you can find the specific requirements
21
+ [here](https://docs.nvidia.com/bionemo-framework/latest/user-guide/getting-started/pre-reqs/).
22
+
23
+ The import of BioNemo operations is gate keeped behing the `LYNXKITE_BIONEMO_INSTALLED` variable.
24
+ BioNemo operations will only be imported if this environment variable is set to true.
25
+
26
+ To build the image:
27
+
28
+ ```bash
29
+ # in lynxkite-graph-analytics folder
30
+ $ docker build -f Dockerfile.bionemo -t lynxkite-bionemo ..
31
+ ```
32
+
33
+ Take into account that this Dockerfile does not include the lynxkite-lynxscribe package. If you want to include it you will
34
+ need to set up git credentials inside the container.
35
+
36
+ Then, inside the image you can start LynxKite as usual.
37
+
38
+ If you want to do some development, then it is recommend to use the [devcontainers](https://code.visualstudio.com/docs/devcontainers/containers)
39
+ vscode extension. The following is a basic configuration to get started:
40
+
41
+ ```json
42
+ // .devcontainer/devcontainer.json
43
+ {
44
+ "name": "Existing Dockerfile",
45
+ "runArgs": [
46
+ "--gpus=all",
47
+ "--shm-size=4g"
48
+ ],
49
+ "build": {
50
+ "context": "..",
51
+ "dockerfile": "../lynxkite-graph-analytics/Dockerfile.bionemo"
52
+ }
53
+ }
54
+ ```
lynxkite-graph-analytics/src/lynxkite_graph_analytics/__init__.py CHANGED
@@ -14,3 +14,6 @@ from .core import * # noqa (easier access for core classes)
14
  from . import lynxkite_ops # noqa (imported to trigger registration)
15
  from . import networkx_ops # noqa (imported to trigger registration)
16
  from . import pytorch_model_ops # noqa (imported to trigger registration)
 
 
 
 
14
  from . import lynxkite_ops # noqa (imported to trigger registration)
15
  from . import networkx_ops # noqa (imported to trigger registration)
16
  from . import pytorch_model_ops # noqa (imported to trigger registration)
17
+
18
+ if os.environ.get("LYNXKITE_BIONEMO_INSTALLED", "").strip().lower() == "true":
19
+ from . import bionemo_ops # noqa (imported to trigger registration)