|
a |
|
b/docs/README.md |
|
|
1 |
# BioNeMo2 Documentation |
|
|
2 |
|
|
|
3 |
## Viewing the current documentation on github pages |
|
|
4 |
|
|
|
5 |
The documentation should be viewable at [https://nvidia.github.io/bionemo-framework/](https://nvidia.github.io/bionemo-framework/). |
|
|
6 |
|
|
|
7 |
## Previewing the documentation locally |
|
|
8 |
|
|
|
9 |
From the repository root: |
|
|
10 |
|
|
|
11 |
```bash |
|
|
12 |
# Build the Docker image |
|
|
13 |
docker build -t nvcr.io/nvidian/cvai_bnmo_trng/bionemo2-docs -f docs/Dockerfile . |
|
|
14 |
|
|
|
15 |
# Run the Docker container |
|
|
16 |
docker run --rm -it -p 8000:8000 \ |
|
|
17 |
-v ${PWD}/docs:/docs -v ${PWD}/sub-packages:/sub-packages \ |
|
|
18 |
nvcr.io/nvidian/cvai_bnmo_trng/bionemo2-docs:latest |
|
|
19 |
``` |
|
|
20 |
|
|
|
21 |
And then navigate to [`http://0.0.0.0:8000`](http://0.0.0.0:8000) on your local |
|
|
22 |
machine. |
|
|
23 |
|
|
|
24 |
## Hiding/collapsing `.ipynb` cells |
|
|
25 |
To remove cells from the rendered `mkdocs` html you can add a `remove-cell` tag to the cell. Note that `remove-output` is also an option to hide outputs but not the code cell. Unfortunately |
|
|
26 |
`remove-input` does not seem to be supported. |
|
|
27 |
|
|
|
28 |
To collapse jupyter-lab rendered code cells, for example in a `brev.dev` or user ran `jupyter lab` session, you can add a special `jupyter` block to the `metadata` block for that cell in the |
|
|
29 |
json representation of your `.ipynb` file. You can do this in vscode by clicking the `...` above the cell and selecting `Edit cell tags (JSON)`. |
|
|
30 |
|
|
|
31 |
A metadata field with both changes, (removed from the rendered docs and collapsed in jupyter) would look like the following: |
|
|
32 |
|
|
|
33 |
```json |
|
|
34 |
"metadata": { |
|
|
35 |
"jupyter": { |
|
|
36 |
"source_hidden": true |
|
|
37 |
}, |
|
|
38 |
"tags": [ |
|
|
39 |
"remove-cell" |
|
|
40 |
] |
|
|
41 |
}, |
|
|
42 |
``` |
|
|
43 |
|
|
|
44 |
aliases for these options can be found in the `- mkdocs-jupyter:` section of `mkdocs.yml` in this folder. |