|
| 1 | +# Hyperactor-mesh Book |
| 2 | + |
| 3 | +This is the development documentation for hyperactor-mesh, built using [`mdBook`](https://rust-lang.github.io/mdBook/). |
| 4 | + |
| 5 | +## Running the Book |
| 6 | + |
| 7 | +### On the **Server** |
| 8 | + |
| 9 | +To run the book on a remote server (e.g., `devgpu004`): |
| 10 | + |
| 11 | +```bash |
| 12 | +x2ssh devgpu004.rva5.facebook.com |
| 13 | +tmux new -s hyperactor-mesh-mdbook |
| 14 | +cd ~/fbsource/fbcode/scripts/shaynefletcher/hyperactor-mesh-book |
| 15 | +mdbook serve --port 3001 |
| 16 | +``` |
| 17 | +Then detach with Ctrl+b, then d. |
| 18 | + |
| 19 | +### On the **Client** |
| 20 | + |
| 21 | +To access the remote book from your local browser: |
| 22 | +```bash |
| 23 | +autossh -M 0 -N -L 3001:localhost:3001 devgpu004.rva5.facebook.com |
| 24 | +``` |
| 25 | +Then open http://localhost:3001 in your browser. |
| 26 | + |
| 27 | +**Note**: If you don’t have autossh installed, you can install it with: |
| 28 | +```bash |
| 29 | +brew install autossh |
| 30 | +``` |
| 31 | + |
| 32 | +### Notes |
| 33 | + |
| 34 | +- The source is located in src/, with structure defined in SUMMARY.md. |
| 35 | +- The book will auto-reload in the browser on edits. |
| 36 | + |
| 37 | +## Cleaning Up |
| 38 | + |
| 39 | +To shut down the book server: |
| 40 | + |
| 41 | +### Option 1: Reattach and stop |
| 42 | + |
| 43 | +```bash |
| 44 | +x2ssh devgpu004.rva5.facebook.com |
| 45 | +tmux attach -t hyperactor-mesh-mdbook |
| 46 | +``` |
| 47 | +Inside the session: |
| 48 | +- Press Ctrl+C to stop mdbook serve |
| 49 | +- Then type exit to close the shell and terminate the tmux session |
| 50 | + |
| 51 | +### Option 2: Kill the session directly |
| 52 | + |
| 53 | +If you don’t want to reattach, you can kill the session from a new shell: |
| 54 | +```bash |
| 55 | +x2ssh devgpu004.rva5.facebook.com |
| 56 | +tmux kill-session -t hyperactor-mesh-mdbook |
| 57 | +``` |
| 58 | + |
| 59 | +### Optional: View active tmux sessions |
| 60 | +```bash |
| 61 | +tmux ls |
| 62 | +``` |
| 63 | +Use this to check whether the mdbook session is still running. |
0 commit comments