Delete README.md
Browse files
README.md
DELETED
|
@@ -1,94 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: DeepSeek Harness
|
| 3 |
-
emoji: 🐳
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: gray
|
| 6 |
-
sdk: docker
|
| 7 |
-
app_port: 7860
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
# DeepSeek Harness (dsh) on a Hugging Face Space
|
| 11 |
-
|
| 12 |
-
This Space runs the latest DeepSeek Harness behind nginx with persistent Hugging
|
| 13 |
-
Face Storage and the `dsh-web-startup-auth` remote-access/auth plugin.
|
| 14 |
-
|
| 15 |
-
## Storage: persist the whole user home
|
| 16 |
-
|
| 17 |
-
Attach a Hugging Face Storage Bucket to this Space and mount it at:
|
| 18 |
-
|
| 19 |
-
`/home/user`
|
| 20 |
-
|
| 21 |
-
Use read-write access.
|
| 22 |
-
|
| 23 |
-
This persists the entire user home, including:
|
| 24 |
-
|
| 25 |
-
- `$DSH_HOME` (`/home/user/.dsh`)
|
| 26 |
-
- DSH settings and provider configuration
|
| 27 |
-
- DSH credentials stored by the app
|
| 28 |
-
- sessions and workspace/user data
|
| 29 |
-
- installed DSH profile plugins
|
| 30 |
-
- web-auth state (`web-auth.json`)
|
| 31 |
-
- user-level `.config`, `.local`, and `.cache` data
|
| 32 |
-
|
| 33 |
-
System software installed into the Docker image (`/usr`, `/opt/npm-global`,
|
| 34 |
-
nginx, Node, and the DSH runtime itself) remains part of the image and is
|
| 35 |
-
recreated from the Dockerfile on rebuild. That is intentional.
|
| 36 |
-
|
| 37 |
-
## Remote settings / Models fix
|
| 38 |
-
|
| 39 |
-
The stock DSH web startup keeps remote privileged configuration APIs loopback-only,
|
| 40 |
-
and the browser also disables settings on a non-loopback hostname. The current
|
| 41 |
-
deployment therefore installs `dsh-web-startup-auth@latest` into the web profile.
|
| 42 |
-
|
| 43 |
-
That plugin provides authenticated remote browser access, fixes the remote
|
| 44 |
-
browser settings gate, handles privileged loopback-authority APIs after
|
| 45 |
-
authentication, and supplies the browser crypto compatibility needed by remote
|
| 46 |
-
HTTP contexts.
|
| 47 |
-
|
| 48 |
-
The plugin is installed/updated from the npm `latest` tag at every container
|
| 49 |
-
start. If the registry is temporarily unavailable, an already-installed copy is
|
| 50 |
-
kept; a first boot fails rather than silently starting without the security and
|
| 51 |
-
settings layer.
|
| 52 |
-
|
| 53 |
-
See the plugin's current documentation for the authentication flow. On first
|
| 54 |
-
visit, use its registration/login page to create the administrator account.
|
| 55 |
-
The authentication state is stored under `/home/user/.dsh`, so it survives
|
| 56 |
-
restarts when the bucket is attached.
|
| 57 |
-
|
| 58 |
-
## Latest packages
|
| 59 |
-
|
| 60 |
-
The Docker build installs:
|
| 61 |
-
|
| 62 |
-
- `@deepseek-ai/dsh@latest`
|
| 63 |
-
- `dsh-mobile-css@latest`
|
| 64 |
-
- `dsh-web-startup-auth@latest`
|
| 65 |
-
|
| 66 |
-
The two web plugins are also refreshed on every boot so a persistent profile
|
| 67 |
-
doesn't permanently pin an old plugin version.
|
| 68 |
-
|
| 69 |
-
## Hugging Face visibility
|
| 70 |
-
|
| 71 |
-
Keep this Space **Private**. DSH has powerful filesystem/agent capabilities.
|
| 72 |
-
The authentication plugin is an additional application-level security layer,
|
| 73 |
-
not a reason to make a powerful agent public.
|
| 74 |
-
|
| 75 |
-
## Secrets
|
| 76 |
-
|
| 77 |
-
Put API keys in Hugging Face Space **Settings → Secrets**, not in this repo.
|
| 78 |
-
|
| 79 |
-
## Port
|
| 80 |
-
|
| 81 |
-
Hugging Face routes the Space to port `7860`. nginx listens on `7860` and
|
| 82 |
-
proxies to DSH on `0.0.0.0:3080` inside the container.
|
| 83 |
-
|
| 84 |
-
## Why nginx no longer rewrites Host/Origin
|
| 85 |
-
|
| 86 |
-
The earlier configuration rewrote `Host`/`Origin` to localhost. That could make
|
| 87 |
-
the server-side loopback check pass, but it could not change the browser's
|
| 88 |
-
actual `location.hostname`, which is what caused:
|
| 89 |
-
|
| 90 |
-
`settings are unavailable in this browser`
|
| 91 |
-
|
| 92 |
-
The remote-auth plugin is designed to solve both sides: the browser-side remote
|
| 93 |
-
settings gate and the authenticated server-side privileged API boundary. nginx
|
| 94 |
-
therefore preserves the HF authority and forwards the real request metadata.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|