Skip to content

Deploy MaterialScope on Vercel via container service (reuses Docker contract) - #26

Merged
utkuvibing merged 1 commit into
mainfrom
vercel-deploy
Aug 30, 2026
Merged

Deploy MaterialScope on Vercel via container service (reuses Docker contract)#26
utkuvibing merged 1 commit into
mainfrom
vercel-deploy

Conversation

@utkuvibing

Copy link
Copy Markdown
Owner

Summary

Adds the minimal Vercel deployment seam so MaterialScope can run on Vercel Hobby (free) as a demo target for feedback, without touching the existing Docker deployment contract.

  • vercel.json (new): single materialscope service with root: ".", runtime: "container", entrypoint: "Dockerfile", plus a catch-all rewrite /(.*) routing all public traffic to that service. Vercel builds the existing root Dockerfile (Chromium, Kaleido, Dash/FastAPI combined server), stores it in the Vercel Container Registry, and serves it as an autoscaling Function on Fluid compute (scale-to-zero after 5 min idle).
  • tests/test_deployment_contract.py: new test_vercel_seam_reuses_docker_contract asserts the seam reuses the real Dockerfile (no Dockerfile.vercel copy, no duplicated Docker contract) and exposes exactly one service via a single catch-all rewrite.

What is intentionally NOT changed

  • Dockerfile, docker/start.sh, requirements.txt, pyproject packaging contract, and all application logic remain untouched.
  • No api/index.py, no serverless runtime, no static shell — the full Dash/FastAPI app runs inside the container as today.
  • docker/start.sh already binds 0.0.0.0:${PORT:-8050}, satisfying Vercel's $PORT contract with zero changes.

Verification

  • Full suite on Python 3.12: 1172 passed, 15 skipped (mirrors CI matrix entry)
  • ruff check . clean
  • tests/test_deployment_contract.py: 8/8 passed

Operational notes (demo scope)

  • Ephemeral filesystem: data resets after 5 min idle (scale-to-zero) and is per-instance — acceptable for the feedback demo; durable storage can be added later via a backing service.
  • Hobby limits: 2 GB RAM / 1 vCPU, 300 s max duration, 100 deploys/day; VCR image storage billed at $0.10/GB beyond included usage.
  • Cold starts after scale-to-zero include the pymatgen stack import (a few seconds on 1 vCPU).

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
materialscope 3f79193 Aug 30 2026, 06:11 PM

@utkuvibing
utkuvibing merged commit 4764ead into main Aug 30, 2026
3 of 4 checks passed
@utkuvibing
utkuvibing deleted the vercel-deploy branch August 30, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant