AI智能体研发之路-工程篇(一):Docker助力AI智能体开发提效

简介: AI智能体研发之路-工程篇(一):Docker助力AI智能体开发提效

一、引言

由于近两年云原生热,大家对docker、docker compose及k8s或多或少都有一些涉猎,即便没有实际应用肯定也耳熟能详,今天对docker及docker compose的命令集进行梳理,大家可以收藏以便之后快速查阅。

二、docker常用命令

Common Commands(常用命令):

  •  run         Create and run a new container from an image(从一个image镜像创建并启动一个新的container容器)
  •  exec        Execute a command in a running container(在一个运行的container容器执行一段命令)
  •  ps          List containers(列出container容器,-a列出全部容器,不加-a列出运行的容器)
  •  build       Build an image from a Dockerfile(从Dockerfile配置文件创建一个image镜像)
  •  pull        Download an image from a registry(从dockerhub等资源库下载一个image镜像)
  •  push        Upload an image to a registry(推送一个镜像至资源库)
  •  images      List images(列出images镜像)
  •  login       Log in to a registry(登陆进一个资源库)
  •  logout      Log out from a registry(从资源库推出)
  •  search      Search Docker Hub for images(从dockerhub中搜索images镜像)
  •  version     Show the Docker version information(看docker的版本信息)
  •  info        Display system-wide information(查看docker附带的插件信息)

Commands:

  •  attach      Attach local standard input, output, and error streams to a running container()
  •  commit      Create a new image from a container's changes
  •  cp          Copy files/folders between a container and the local filesystem
  •  create      Create a new container
  •  diff        Inspect changes to files or directories on a container's filesystem
  •  events      Get real time events from the server
  •  export      Export a container's filesystem as a tar archive
  •  history     Show the history of an image
  •  import      Import the contents from a tarball to create a filesystem image
  •  inspect     Return low-level information on Docker objects(返回container或images的元数据)
  •  kill        Kill one or more running containers(杀死一个或更多个运行的container容器)
  •  load        Load an image from a tar archive or STDIN
  •  logs        Fetch the logs of a container(取出container容器运行日志)
  •  pause       Pause all processes within one or more containers
  •  port        List port mappings or a specific mapping for the container列出容器与宿主机的映射关系
  •  rename      Rename a container(重命名一个容器)
  •  restart     Restart one or more containers(重启一个或更多个container容器)
  •  rm          Remove one or more containers(删除一个或更多个container容器)
  •  rmi         Remove one or more images(删除一个或更多个image镜像)
  •  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  •  start       Start one or more stopped containers(开始一个或更多个停止的容器)
  •  stats       Display a live stream of container(s) resource usage statistics
  •  stop        Stop one or more running containers(停止一个或多个运行中的容器)
  •  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE(对二次开发的image镜像打标签)
  •  top         Display the running processes of a container(显示一个容器内运行的进程)
  •  unpause     Unpause all processes within one or more containers
  •  update      Update configuration of one or more containers(更新一个或更多容器的配置)
  •  wait        Block until one or more containers stop, then print their exit codes

Management Commands(管理命令):

  •  builder     Manage builds
  •  buildx*     Docker Buildx (Docker Inc., v0.11.0)
  •  checkpoint  Manage checkpoints
  •  compose*    Docker Compose (Docker Inc., v2.19.1)
  •  container   Manage containers
  •  context     Manage contexts
  •  dev*        Docker Dev Environments (Docker Inc., v0.1.0)
  •  extension*  Manages Docker extensions (Docker Inc., v0.2.20)
  •  image       Manage images
  •  init*       Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.6)
  •  manifest    Manage Docker image manifests and manifest lists
  •  network     Manage networks
  •  plugin      Manage plugins
  •  sbom*       View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  •  scan*       Docker Scan (Docker Inc., v0.26.0)
  •  scout*      Command line tool for Docker Scout (Docker Inc., 0.16.1)
  •  system      Manage Docker
  •  trust       Manage trust on Docker images
  •  volume      Manage volumes

Swarm Commands:

  •  config      Manage Swarm configs
  •  node        Manage Swarm nodes
  •  secret      Manage Swarm secrets
  •  service     Manage Swarm services
  •  stack       Manage Swarm stacks
  •  swarm       Manage Swarm

Global Options:

  • --config string      Location of client config files (default "/Users/daoguang1/.docker")
  • -c, --context string     Name of the context to use to connect to the daemon (overrides DOCKER_HOST env var and default context set with "docker context use")
  • -D, --debug              Enable debug mode
  • -H, --host list          Daemon socket to connect to
  • -l, --log-level string   Set the logging level ("debug", "info", "warn", "error", "fatal") (default "info")
  • --tls                Use TLS; implied by --tlsverify
  • --tlscacert string   Trust certs signed only by this CA (default "/Users/daoguang1/.docker/ca.pem")
  • --tlscert string     Path to TLS certificate file (default "/Users/daoguang1/.docker/cert.pem")
  • --tlskey string      Path to TLS key file (default "/Users/daoguang1/.docker/key.pem")
  • --tlsverify          Use TLS and verify the remote
  • -v, --version            Print version information and quit

三、docker compose常用命令

Commands(命令):

  •  build       Build or rebuild services
  •  config      Parse, resolve and render compose file in canonical format
  •  cp          Copy files/folders between a service container and the local filesystem
  •  create      Creates containers for a service.
  •  down        Stop and remove containers, networks
  •  events      Receive real time events from containers.
  •  exec        Execute a command in a running container.
  •  images      List images used by the created containers
  •  kill        Force stop service containers.
  •  logs        View output from containers
  •  ls          List running compose projects
  •  pause       Pause services
  •  port        Print the public port for a port binding.
  •  ps          List containers
  •  pull        Pull service images
  •  push        Push service images
  •  restart     Restart service containers
  •  rm          Removes stopped service containers
  •  run         Run a one-off command on a service.
  •  start       Start services
  •  stop        Stop services
  •  top         Display the running processes 列出容器组合中每个容器的进程,需要在docker-compose.yaml所在目录执行
  •  unpause     Unpause services
  •  up          Create and start containers 创建或启动容器组合,需要在docker-compose.yaml所在目录执行
  •  version     Show the Docker Compose version information 展示docker compose版本

Options(配置):

  •      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
  •      --compatibility              Run compose in backward compatibility mode
  •      --dry-run                    Execute command in dry run mode
  •      --env-file stringArray       Specify an alternate environment file.
  •  -f, --file stringArray           Compose configuration files
  •      --parallel int               Control max parallelism, -1 for unlimited (default -1)
  •      --profile stringArray        Specify a profile to enable
  •      --progress string            Set type of progress output (auto, tty, plain, quiet) (default "auto")
  •      --project-directory string   Specify an alternate working directory
  •                                   (default: the path of the, first specified, Compose file)
  •  -p, --project-name string        Project name

四、总结

现在不仅AI厂商卷,开源项目也卷的要命,基本上所有的开源项目都会将镜像上传至dockerhub,并且支持docker或者docker compose的一键部署,收藏一份命令集,随时用随时找。


目录
相关文章
|
1天前
|
人工智能 JSON 数据格式
RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
【9月更文挑战第6天】RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
RAG+Agent人工智能平台:RAGflow实现GraphRA知识库问答,打造极致多模态问答与AI编排流体验
|
3天前
|
人工智能 算法 自动驾驶
用AI自动设计智能体,数学提分25.9%,远超手工设计
【9月更文挑战第18天】《智能体自动设计(ADAS)》是由不列颠哥伦比亚大学等机构的研究者们发布的一篇关于自动化设计智能体系统的最新论文。研究中提出了一种创新算法——“Meta Agent Search”,此算法通过迭代生成并优化智能体设计,从而实现更高效的智能体系统构建。实验表明,相比人工设计的智能体,Meta Agent Search生成的智能体在多个领域均有显著的性能提升。然而,该方法也面临着实际应用中的有效性与鲁棒性等挑战。论文详细内容及实验结果可于以下链接查阅:https://arxiv.org/pdf/2408.08435。
31 12
|
7天前
|
人工智能 Cloud Native Serverless
来云栖大会!探展云上开发,沉浸式体验云原生 + AI 新奇玩法
计算馆将展示中国最先进的云计算产业链全景,从底层硬件到数据创新,从云计算基础设施到数据管理服务、人工智能平台和模型服务,全景式呈现 AI 时代云计算最新技术形态和产品进展。计算馆有哪些推荐?往下看!
|
23天前
|
机器学习/深度学习 人工智能 自然语言处理
还不懂如何与AI高效交流?保姆级且全面的chatGPT提示词工程教程来啦!(一)基础篇
这篇文章是一篇保姆级的教程,旨在全面介绍如何与AI进行高效交流,包括ChatGPT的前世今生、应用场景以及提问的基础技巧。
还不懂如何与AI高效交流?保姆级且全面的chatGPT提示词工程教程来啦!(一)基础篇
|
11天前
|
持续交付 开发者 Docker
掌握 Docker:容器化技术在现代开发中的应用
Docker 是一个开源容器化平台,使开发者能够将应用程序及其依赖项封装在轻量级容器中,确保跨平台的一致性。本文介绍了 Docker 的基本概念、核心组件及优势,并展示了其在快速部署、一致性、可移植性和微服务架构中的应用。通过示例说明了 Docker 在本地开发环境搭建、服务依赖管理和 CI/CD 流程中的作用,以及多阶段构建、资源限制和网络模式等高级特性。掌握 Docker 可大幅提升开发效率和应用管理能力。
|
17天前
|
人工智能 JSON 自然语言处理
你的Agent稳定吗?——基于大模型的AI工程实践思考
本文总结了作者在盒马智能客服的落地场景下的一些思考,从工程的角度阐述对Agent应用重要的稳定性因素和一些解法。
|
26天前
|
人工智能 分布式计算 数据处理
Big Data for AI实践:面向AI大模型开发和应用的大规模数据处理套件
文叙述的 Big Data for AI 最佳实践,基于阿里云人工智能平台PAI、MaxCompute自研分布式计算框架MaxFrame、Data-Juicer等产品和工具,实现了大模型数据采集、清洗、增强及合成大模型数据的全链路,解决企业级大模型开发应用场景的数据处理难题。
|
24天前
|
机器学习/深度学习 Kubernetes Docker
机器学习开发的灵药:Docker容器
机器学习开发的灵药:Docker容器
|
11天前
|
存储 机器学习/深度学习 人工智能
深入浅出 AI 智能体(AI Agent)|技术干货
随着人工智能技术的发展,智能体(AI Agents)逐渐成为人与大模型交互的主要方式。智能体能执行任务、解决问题,并提供个性化服务。其关键组成部分包括规划、记忆和工具使用,使交互更加高效、自然。智能体的应用涵盖专业领域问答、资讯整理、角色扮演等场景,极大地提升了用户体验与工作效率。借助智能体开发平台,用户可以轻松打造定制化AI应用,推动AI技术在各领域的广泛应用与深度融合。
136 0
|
21天前
|
容器 C# Docker
WPF与容器技术的碰撞:手把手教你Docker化WPF应用,实现跨环境一致性的开发与部署
【8月更文挑战第31天】容器技术简化了软件开发、测试和部署流程,尤其对Windows Presentation Foundation(WPF)应用程序而言,利用Docker能显著提升其可移植性和可维护性。本文通过具体示例代码,详细介绍了如何将WPF应用Docker化的过程,包括创建Dockerfile及构建和运行Docker镜像的步骤。借助容器技术,WPF应用能在任何支持Docker的环境下一致运行,极大地提升了开发效率和部署灵活性。
36 0