AIFeed

Vercel Sandbox 现已支持 Arm®

AI summary

Vercel Sandbox 现已在 iad1 区域公测支持 arm64,可直接使用 linux/arm64 容器镜像或运行基于 Arm 的二进制文件,创建沙箱时传入 architecture: "arm64" 即可,默认仍保持 amd64 以兼容旧用法。universal、node、python 和 ubuntu 这几个 Vercel 托管镜像现已包含 arm64 构建;如需使用自有镜像,请为 linux/arm64 构建并推送至 Vercel Container Registry,同时将 Sandbox SDK 或 CLI 更新至最新版本。

Translation(model translation, not the source's own text)

文章标题:Vercel Sandbox 现已支持 Arm®

正文: Vercel Sandbox 现已在 iad1 区域以公开测试版形式支持 arm64。你可以直接使用 linux/arm64 容器镜像,无需为 amd64 交叉构建,也可以直接运行基于 Arm 的二进制文件。

创建沙箱时传入 architecture: "arm64"。为保持兼容性,默认仍为 amd64。


        import { Sandbox } from "@vercel/sandbox";
const sandbox = await Sandbox.create({ architecture: "arm64" });console.log(sandbox.architecture); // arm64
      

创建一个 arm64 沙箱。

universal、node、python 和 ubuntu 这些 Vercel Managed Images 现已包含 arm64 构建。若要使用你自己的镜像,请为 linux/arm64 构建并推送至 Vercel Container Registry。


        vercel vcr build docker . my-app:latest --platform linux/arm64 --push
      

构建 arm64 镜像并推送至 Vercel Container Registry。

将你的 Sandbox SDK 或 CLI 更新到最新版本。


        pnpm add @vercel/[email protected]
      

升级 JavaScript SDK。

阅读架构文档,创建你的第一个 arm64 沙箱。

Only about 737 characters could be extracted — the rest did not come through (common on sites that need scrolling or a login). Read the original for the full piece.

Published by Vercel Blog
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗