Spaces:
Sleeping

openreels-deploy commited on
Commit
f554a33
·
1 Parent(s): bbef654

fix: check the model cache where transformers.js actually writes it

Browse files
Files changed (3) hide show
  1. .env.example +14 -1
  2. Dockerfile +5 -3
  3. src/api/openapi.ts +5 -0
.env.example CHANGED
@@ -44,9 +44,13 @@ PEXELS_API_KEY=
44
  PIXABAY_API_KEY=
45
 
46
  # Optional: API server
47
- # Require this key on all API routes except /health, /openapi.json, and /docs.
 
48
  # Clients may send Authorization: Bearer <key>, X-API-Key: <key>, or ?api_key=<key>.
49
  # OPENREELS_API_KEY=
 
 
 
50
  # Comma-separated browser origins, "*" for any, or "false" to disable CORS.
51
  # OPENREELS_CORS_ORIGIN=*
52
  # Allow webhook callbacks to private/internal addresses (trusted networks only).
@@ -65,7 +69,16 @@ PIXABAY_API_KEY=
65
  # moves on to the next model, in milliseconds.
66
  # OPENREELS_LLM_FALLBACK_RETRY_BUDGET_MS=45000
67
 
 
 
 
 
 
 
68
  # Optional: Render tuning (CPU-only servers)
 
 
 
69
  # Remotion delayRender timeout, in milliseconds. Raise this on small VMs.
70
  # OPENREELS_RENDER_TIMEOUT_MS=120000
71
  # Parallel browser tabs used to render frames. 1 is fastest on 1-2 vCPU boxes.
 
44
  PIXABAY_API_KEY=
45
 
46
  # Optional: API server
47
+ # Require this key on every API route except /health. The web app opens on a
48
+ # sign-in screen and will not render until the key is entered.
49
  # Clients may send Authorization: Bearer <key>, X-API-Key: <key>, or ?api_key=<key>.
50
  # OPENREELS_API_KEY=
51
+ # Fail closed: with no key configured, answer 503 on every API route instead of
52
+ # serving the whole surface. Set this on any host the public can reach.
53
+ # OPENREELS_AUTH_REQUIRED=false
54
  # Comma-separated browser origins, "*" for any, or "false" to disable CORS.
55
  # OPENREELS_CORS_ORIGIN=*
56
  # Allow webhook callbacks to private/internal addresses (trusted networks only).
 
69
  # moves on to the next model, in milliseconds.
70
  # OPENREELS_LLM_FALLBACK_RETRY_BUDGET_MS=45000
71
 
72
+ # Optional: Local narration (Piper)
73
+ # Piper runs the ONNX voice natively and synthesises at roughly twenty times
74
+ # faster than real time. The container image installs it at these paths.
75
+ # PIPER_BINARY=/opt/piper/piper
76
+ # PIPER_MODEL=/opt/piper-voices/en_GB-alan-medium.onnx
77
+
78
  # Optional: Render tuning (CPU-only servers)
79
+ # H.264 quality. Higher is smaller. 23 is roughly a third the size of the
80
+ # default and is invisible after YouTube re-encodes.
81
+ # OPENREELS_RENDER_CRF=23
82
  # Remotion delayRender timeout, in milliseconds. Raise this on small VMs.
83
  # OPENREELS_RENDER_TIMEOUT_MS=120000
84
  # Parallel browser tabs used to render frames. 1 is fastest on 1-2 vCPU boxes.
Dockerfile CHANGED
@@ -89,9 +89,11 @@ COPY . .
89
  # Build the frontend (the API server serves it from web/dist)
90
  RUN cd web && npx vite build
91
 
92
- # Word-alignment model, baked in. The aligner caches to ./.cache, so this both
93
- # warms the cache and proves the model downloads cleanly at build time.
94
- RUN node scripts/prefetch-aligner.mjs && du -sh .cache
 
 
95
 
96
  RUN mkdir -p /app/jobs /output && chmod +x /app/docker-entrypoint.sh
97
 
 
89
  # Build the frontend (the API server serves it from web/dist)
90
  RUN cd web && npx vite build
91
 
92
+ # Word-alignment model, baked in. transformers.js caches into its own package
93
+ # directory, so this both warms the cache and proves the model downloads
94
+ # cleanly at build time. A fresh container then never fetches it mid-render.
95
+ RUN node scripts/prefetch-aligner.mjs \
96
+ && du -sh node_modules/@huggingface/transformers/.cache
97
 
98
  RUN mkdir -p /app/jobs /output && chmod +x /app/docker-entrypoint.sh
99
 
src/api/openapi.ts CHANGED
@@ -25,6 +25,11 @@ const jobSchema = {
25
  metadata: { type: "object", additionalProperties: true },
26
  stages: { type: "object", additionalProperties: true },
27
  videoPath: { type: "string", nullable: true },
 
 
 
 
 
28
  runDir: { type: "string", nullable: true },
29
  score: { type: "object", additionalProperties: true },
30
  costEstimate: { type: "object", additionalProperties: true },
 
25
  metadata: { type: "object", additionalProperties: true },
26
  stages: { type: "object", additionalProperties: true },
27
  videoPath: { type: "string", nullable: true },
28
+ posterPath: {
29
+ type: "string",
30
+ nullable: true,
31
+ description: "Still frame of the finished short.",
32
+ },
33
  runDir: { type: "string", nullable: true },
34
  score: { type: "object", additionalProperties: true },
35
  costEstimate: { type: "object", additionalProperties: true },