File size: 3,995 Bytes
b51442b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Hugging Face Space Connection Notes

Space: https://huggingface.co/spaces/archivartaunik/NotebookLM

Runtime URL: https://archivartaunik-notebooklm.hf.space

Repo: https://huggingface.co/spaces/archivartaunik/NotebookLM

Local workspace: `D:\CodexPRJ\OpenNotebook`

Hugging Face account currently used by `hf` CLI: `archivartaunik`

## SSH / Dev Mode

Dev Mode SSH command:

```powershell
ssh -i C:\Users\admin\.ssh\hagginfacekey archivartaunik-notebooklm@ssh.hf.space
```

Equivalent Hugging Face CLI command to print the SSH command:

```powershell
hf spaces ssh archivartaunik/NotebookLM --dry-run -i C:\Users\admin\.ssh\hagginfacekey
```

Enable Dev Mode:

```powershell
hf spaces dev-mode archivartaunik/NotebookLM
```

Disable Dev Mode:

```powershell
hf spaces dev-mode archivartaunik/NotebookLM --stop
```

Check Space status:

```powershell
hf spaces info archivartaunik/NotebookLM
```

Restart Space:

```powershell
hf spaces restart archivartaunik/NotebookLM
```

Factory rebuild if the normal restart keeps an old container:

```powershell
hf spaces restart archivartaunik/NotebookLM --factory-reboot
```

## Repo Workflow

Local repo remote:

```powershell
git remote -v
```

Expected remote:

```text
origin  https://huggingface.co/spaces/archivartaunik/NotebookLM (fetch)
origin  https://huggingface.co/spaces/archivartaunik/NotebookLM (push)
```

Before pushing, sync with remote:

```powershell
git fetch origin
git rebase origin/main
```

Commit and push:

```powershell
git add <files>
git commit -m "Your commit message"
git push origin main
```

Important: changes made directly inside Dev Mode SSH are not safely preserved unless committed and pushed from inside the Space or copied back to the local repo and pushed.

## Useful Runtime Checks

Check that SSH reaches the Space:

```powershell
ssh -o StrictHostKeyChecking=accept-new -i C:\Users\admin\.ssh\hagginfacekey archivartaunik-notebooklm@ssh.hf.space "pwd && echo SSH_OK"
```

Check API health from inside the Space:

```powershell
ssh -i C:\Users\admin\.ssh\hagginfacekey archivartaunik-notebooklm@ssh.hf.space "curl -fsS http://localhost:5055/health"
```

Check frontend from inside the Space:

```powershell
ssh -i C:\Users\admin\.ssh\hagginfacekey archivartaunik-notebooklm@ssh.hf.space "curl -fsS -o /dev/null -w 'frontend_http=%{http_code}\n' http://localhost:8502"
```

Check important processes:

```powershell
ssh -i C:\Users\admin\.ssh\hagginfacekey archivartaunik-notebooklm@ssh.hf.space "ps -eo pid,stat,comm,args | grep -E 'supervisord|uvicorn|next-server|surreal-command|surreal start' | grep -v grep"
```

Fetch run logs:

```powershell
$env:PYTHONIOENCODING='utf-8'
hf spaces logs archivartaunik/NotebookLM --tail 120
```

Fetch build logs:

```powershell
$env:PYTHONIOENCODING='utf-8'
hf spaces logs archivartaunik/NotebookLM --build
```

## Bextts / ZeroGPU Token

NotebookLM uses the public Bextts Space for Belarusian TTS:

```powershell
hf spaces info archivartaunik/Bextts --expand runtime
```

The Bextts Space runs on ZeroGPU, so NotebookLM must call it with an authenticated
Hugging Face token. Store the token as a NotebookLM Space secret:

```powershell
$token = hf auth token
hf spaces secrets add archivartaunik/NotebookLM -s "HF_TOKEN=$token"
```

At startup, `start-hf.sh` copies `HF_TOKEN` into the Bextts model credential config
as the provider API key. Without this, Bextts calls are anonymous and can fail with
`Bextts generation failed` while Bextts logs show `ZeroGPU quota exceeded`.

## Current Notes

- Dev Mode requires the Docker image to include `git`. The Dockerfile currently installs `bash`, `curl`, `git`, `git-lfs`, `procps`, and `wget`.
- The previous startup crash was caused by a directory named `/app/frontend/node_modules/next/dist/compiled/ipaddr.js`. `start-hf.sh` now skips non-files before calling `read_text()`.
- Current known good commit after that fix: `fb2282d`.
- Do not store Hugging Face access tokens or service account secrets in this document.