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的一键部署,收藏一份命令集,随时用随时找。


目录
相关文章
|
4天前
|
人工智能 小程序
一步步开发AI运动小程序】二、引入插件
随着人工智能技术的发展,阿里体育等公司推出的“乐动力”、“天天跳绳”等AI运动APP广受欢迎。本文将引导您从零开始开发一个AI运动小程序,使用“云智AI运动识别小程序插件”。内容包括新建uni-app项目、配置插件、部署模型、安装依赖包、全局初始化和调用插件对象。
|
1天前
|
人工智能 编解码 小程序
【一步步开发AI运动小程序】四、小程序如何抽帧
随着AI技术的发展,阿里体育等公司推出的“乐动力”、“天天跳绳”等APP使云上运动会、线上健身等概念备受关注。本文将引导您从零开始开发一个AI运动小程序,利用“云智AI运动识别小程序插件”。文中详细介绍了微信小程序抽帧的相关API、设置及注意事项,帮助开发者更好地实现AI运动功能。下篇将介绍人体识别技术,敬请期待。
|
22小时前
|
机器学习/深度学习 人工智能 算法
介绍一下AI在药物研发中的应用。
【10月更文挑战第16天】介绍一下AI在药物研发中的应用。
7 0
|
3天前
|
机器学习/深度学习 人工智能 监控
利用AI进行代码审查:提升代码质量和开发效率
【10月更文挑战第12天】本文探讨了AI在代码审查中的应用及其优势,介绍了AI辅助代码审查工具如何通过自动化和持续学习提升代码质量和开发效率。文章还提供了实施AI辅助代码审查的具体步骤和实战技巧,帮助团队更好地利用这些工具。
|
4天前
|
人工智能
添加一个Stable Difussion图像生成应用,通过向AI助手简单的提问,即可快速搭建Stable Diffusion应用至自己的网站中,大幅提升开发效率。
添加一个Stable Difussion图像生成应用,通过向AI助手简单的提问,即可快速搭建Stable Diffusion应用至自己的网站中,大幅提升开发效率。
|
4天前
|
存储 人工智能 NoSQL
使用 MongoDB 构建 AI:Gradient Accelerator Block 如何在几秒钟内让您从零开发 AI
借助 MongoDB,开发者可以存储任何结构的数据,然后使用单一查询 API 和驱动程序将这些数据用于 OLTP、文本搜索和向量搜索处理。
|
12天前
|
机器学习/深度学习 人工智能 算法
打造你的超级Agent智能体——在虚拟迷宫中智斗未知,解锁AI进化之谜的惊心动魄之旅!
【10月更文挑战第5天】本文介绍了一个基于强化学习的Agent智能体项目实战,通过控制Agent在迷宫环境中找到出口来完成特定任务。文章详细描述了环境定义、Agent行为及Q-learning算法的实现。使用Python和OpenAI Gym框架搭建迷宫环境,并通过训练得到的Q-table测试Agent表现。此项目展示了构建智能体的基本要素,适合初学者理解Agent概念及其实现方法。
46 9
|
4天前
|
人工智能 前端开发 测试技术
探索前端与 AI 的结合:如何用 GPT-4 助力开发效率
本文介绍了 GPT-4 如何成为前端开发者的“神队友”,让开发变得更加高效愉快。无论是需求到代码的自动生成、快速调试和性能优化,还是自动化测试和技术选型,GPT-4 都能提供极大的帮助。通过智能生成代码、捕捉 BUG、优化性能、自动化测试生成以及技术支持,GPT-4 成为开发者不可或缺的工具,帮助他们从繁重的手动任务中解脱出来,专注于创新和创意。GPT-4 正在彻底改变开发流程,让开发者从“辛苦码农”转变为“效率王者”。
12 0
探索前端与 AI 的结合:如何用 GPT-4 助力开发效率
|
8天前
|
人工智能 监控 IDE
利用AI进行代码生成:开发新纪元
【10月更文挑战第9天】人工智能在软件开发领域的应用日益广泛,特别是AI驱动的代码生成技术。本文介绍了AI代码生成的原理、核心优势及实施步骤,探讨了其在自动补全、代码优化和快速原型开发中的应用,并提供了实战技巧,旨在帮助开发者高效利用这一技术提升开发质量和效率。
|
9天前
|
人工智能 算法 决策智能
面向软件工程的AI智能体最新进展,复旦、南洋理工、UIUC联合发布全面综述
【10月更文挑战第9天】近年来,基于大型语言模型(LLM)的智能体在软件工程领域展现出显著成效。复旦大学、南洋理工大学和伊利诺伊大学厄巴纳-香槟分校的研究人员联合发布综述,分析了106篇论文,探讨了这些智能体在需求工程、代码生成、静态代码检查、测试、调试及端到端软件开发中的应用。尽管表现出色,但这些智能体仍面临复杂性、性能瓶颈和人机协作等挑战。
21 1