本地部署AI代码自动补全工具—–Tabby

本地部署AI代码自动补全工具—–Tabby

介绍

一款适用于vscode代码编辑器的自动补全工具

github:https://github.com/TabbyML/tabby

官网:https://tabbyml.github.io/tabby/docs/getting-started

GIF 2023-7-24 14-07-48

安装教程

安装前请确保你的电脑安装了docker

拉取docker镜像

第一种方式

docker run \
  --gpus all -p 8080:8080 -v $HOME/.tabby:/data \
  tabbyml/tabby \
  serve --model TabbyML/SantaCoder-1B --device cuda

第二种方式

创建docker-compose.yml 文件并写入一下内容

version: '3.5'
services:
  tabby:
    restart: always
    image: tabbyml/tabby
    command: serve --model TabbyML/SantaCoder-1B --device cuda
    volumes:
      - "$HOME/.tabby:/data"
    ports:
      - 8080:8080
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

终端运行

docker compose up -d

验证

查看容器是否运行

image

.浏览器访问

http://127.0.0.1:8080/

出现一下画面,就表示成功了

QQ截图20230724164151

安装vscode插件

QQ截图20230724164250

设置插件,状态是这样就表示成功了

QQ截图20230724164344

 

© 版权声明
THE END
喜欢就支持一下吧
点赞15赞赏 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容