Skip to content

Deployment & configuration

Variable Required Where Purpose
HF_TOKEN ✓ server only Hugging Face token with read access to the private Space. Never prefix it with VITE_, or Vite embeds it in the browser bundle
VITE_SPACE_ID — build Space id (owner/name); default akashch1512/SingleViewHeigthEstimation
HF_SPACE_URL — server Override the Space URL derived from VITE_SPACE_ID
PORT — server Port for npm run serve (default 8080)
OVERPASS_USER_AGENT — server User-Agent for the Overpass relay
Variable Purpose
DW_CKPT PyTorch checkpoint to load at import
DW_ONNX ONNX graph to load at import (takes precedence over the checkpoint)
DW_JOBS_DIR Job output directory (default outputs/jobs)

Frontend/vercel.json maps the proxy routes onto serverless functions:

Frontend/vercel.json
{
"rewrites": [
{ "source": "/hf-space/:path*", "destination": "/api/hf-space?__path=:path*" },
{ "source": "/overpass/:mirror", "destination": "/api/overpass?__mirror=:mirror" }
],
"functions": {
"api/hf-space.js": { "maxDuration": 300 },
"api/overpass.js": { "maxDuration": 60 }
}
}
  1. Import the repository in Vercel and set Root Directory to Frontend.
  2. Add HF_TOKEN (and optionally VITE_SPACE_ID) as environment variables.
  3. Deploy. The build runs npm run build and serves dist/.

The hosted model is a private Gradio Space on ZeroGPU. Each call reserves a GPU slot (@spaces.GPU) for 45 s, or 120 s with TTA. GPU time is billed against the daily ZeroGPU quota of the account that owns HF_TOKEN. When it runs out, the app shows GPU quota used up.

Terminal window
cd Model_Traning/v5
pip install -r requirements.txt
python -m geo.dem --prime scene.tif # optional: cache DEMs for offline use
DW_ONNX=/models/depthwizard.onnx uvicorn serve.app:app --host 0.0.0.0 --port 8000

The docs site is a static Astro Starlight build in Docs-Site/:

Terminal window
cd Docs-Site
npm install
npm run dev # http://localhost:4321
npm run build # → dist/ (fails on broken internal links)

On Vercel, set Root Directory to Docs-Site. The included vercel.json selects the Astro framework preset. Node 22.12 or later is required.

The repository has one GitHub Actions workflow, pr-agent.yml, an automated PR reviewer. It has no build, test or deploy workflows yet.