SuperAPI AI 工具集

modal-knowledge

通用与其它

查看项目

更新于 10-15 23:41

技能介绍

用途:该技能提供 Modal.com 无服务器云平台的综合知识,当用户需要了解 Modal 平台功能、GPU 加速 Python 函数、容器配置、定价计费、CLI 命令、Web 端点与 API、定时任务、存储、并行处理及部署 CI/CD 时激活。

主要能力:涵盖 Modal 核心组件(App 与 Function、@app.function 装饰器参数如 image、gpu、cpu、memory、timeout、retries、secrets、volumes、schedule、concurrency_limit、container_idle_timeout)、GPU 型号与配置(T4、L4、A10G、L40S、A100、H100、H200、B200,支持多卡与回退)、镜像构建(debian_slim、from_dockerfile、from_registry、pip_install、uv_pip_install、apt_install、run_commands、add_local_file/dir/python_source、env、run_function)、存储(Volume、Secret、Dict、Queue)、Web 端点(fastapi_endpoint、asgi_app、wsgi_app、web_server、自定义域名)、调度(Cron、Period)、并行处理(map、starmap、spawn)、容器生命周期类(@app.cls 配合 @modal.enter/@modal.method/@modal.exit、@modal.concurrent)、CLI 命令(run、serve、shell、deploy、app list/logs/stop、volume、secret、environment)、定价方案与计算费用、最佳实践与常见模式(LLM 推理、批处理、定时 ETL)。

使用方式:以 Python 代码定义 App 与函数,通过装饰器配置资源;开发时用 modal run、modal serve、modal shell,部署用 modal deploy;定时函数仅在 modal deploy 下运行。

适用场景:AI/ML 工作负载、GPU 推理与训练、批处理、定时 ETL、Web API 部署。

限制:资料未提供官方文档链接、完整 API 参考、错误处理细节及部分功能的具体限制说明。