TaskingAI实践(一)快速上手

TaskingAI实践-20240912:

20240912 写在前面 我们一直走一直看,路过的风景,一闪而过的瞬间,终究还是会留下瞬间印记。不学习不代表它不存在,学习了不代表它就直接可以用,不用不代表它没有用。说到最深处,人生就是一场体验。

TaskingAI:

TaskingAI 是一个基于大语言模型 (LLM) 的开发与部署平台,提供统一的 API 接入数百个 AI 模型,并通过直观的用户界面管理功能模块,如工具、RAG 系统、助手等。其主要特点包括一键部署、异步高效处理、集成各种 LLM 模型和插件。支持状态和无状态的使用方式,帮助开发者轻松构建多租户 AI 应用。通过 Docker 快速启动,也提供 SDK 与 API 进行编程交互。

更多信息可以查看TaskingAI

快速上手Quickstart with Docker

A simple way to initiate self-hosted TaskingAI community edition is through Docker.

前置环境准备Prerequisites

  • Docker环境,Docker and Docker Compose installed on your machine.
  • GIT环境,Git installed for cloning the repository.
  • Python环境>3.8,Python environment (above Python 3.8) for running the client SDK.

安装 Installation

从GitHub下载项目源代码

First, clone the TaskingAI (community edition) repository from GitHub.

git clone https://github.com/taskingai/taskingai.git
cd taskingai

进入到项目仓库,进入到docker目录,

Inside the cloned repository, go to the docker directory.

cd docker
  1. Copy .env.example to .env:

    cp .env.example .env
    
  2. Edit the .env file : Open the .env file in your favorite text editor and update the necessary configurations. Ensure all required environment variables are set correctly.

  3. Start Docker Compose: Run the following command to start all services:

    docker-compose -p taskingai --env-file .env up -d
    

项目启动后直接访问, http://localhost:8080。默认用户名和密码是 admin and TaskingAI321.

Once the service is up, access the TaskingAI console through your browser with the URL http://localhost:8080. The default username and password are admin and TaskingAI321.

升级操作 Upgrade

If you have already installed TaskingAI with a previous version and want to upgrade to the latest version, first update the repository.

git pull origin master

Then stop the current docker service, upgrade to the latest version by pulling the latest image, and finally restart the service.

cd docker
docker-compose -p taskingai down
docker-compose -p taskingai pull
docker-compose -p taskingai --env-file .env up -d

Don't worry about data loss; your data will be automatically migrated to the latest version schema if needed.


问题:

8080端口占用

实践遇到的docker端口占用问题,当然和taskingAI本身无关,是环境问题,解决端口冲突即可。

bash 复制代码
➜  docker git:(master) pwd
/Users/zhizhou/Documents/docker_home/taskingai/docker

➜  docker git:(master) docker-compose -p taskingai --env-file .env up -d
[+] Running 7/8
 ⠿ Container taskingai-cache-1              Running                                            0.0s
 ⠿ Container taskingai-db-1                 Running                                            0.0s
 ⠿ Container taskingai-backend-inference-1  Start...                                          21.0s
 ⠿ Container taskingai-backend-plugin-1     Started                                           21.0s
 ⠿ Container taskingai-backend-web-1        Started                                           11.2s
 ⠿ Container taskingai-backend-api-1        Started                                           11.2s
 ⠿ Container taskingai-frontend-1           Started                                            1.3s
 ⠿ Container taskingai-nginx-1              Starting                                           1.2s
Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:8080 -> 0.0.0.0:0: listen tcp 0.0.0.0:8080: bind: address already in use

上述终端表示 端口被占用,检查一下是否有正在启动的Java程序 或者直接查看端口8080的使用情况。

bash 复制代码
➜  docker git:(master) lsof -i:8080
COMMAND   PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
java    45590 zhizhou   96u  IPv6 0x717191f587125ef1      0t0  TCP *:http-alt (LISTEN)
➜  docker git:(master) lsof -i:8080
➜  docker git:(master) docker-compose -p taskingai up -d                   
[+] Running 8/8
 ⠿ Container taskingai-cache-1              Running                                            0.0s
 ⠿ Container taskingai-db-1                 Running                                            0.0s
 ⠿ Container taskingai-backend-plugin-1     Running                                            0.0s
 ⠿ Container taskingai-backend-inference-1  Runni...                                           0.0s
 ⠿ Container taskingai-backend-web-1        Running                                            0.0s
 ⠿ Container taskingai-backend-api-1        Started                                            0.2s
 ⠿ Container taskingai-frontend-1           Running                                            0.0s
 ⠿ Container taskingai-nginx-1              Started                                            0.3s
➜  docker git:(master) 

相关文档

github:

https://github.com/TaskingAI/TaskingAI?tab=readme-ov-file

首页

https://tasking.ai/

API文档

https://docs.tasking.ai/api/

相关推荐
go54631584657 小时前
本地部署 GitHub 上的 Python 人脸识别项目
开发语言·python·github
AlfredZhao10 小时前
公众号已上线 Ask AI 功能
ai·智能体·公众号·deepseek·ask ai
CodeCaster11 小时前
他来了,为大模型量身定制的响应式编程范式(1) —— 从接入 DeepSeek 开始吧
java·ai·langchain
哥不是小萝莉11 小时前
使用 DeepSeek R1 和 Ollama 开发 RAG 系统
ai·deepseek
gange57414 小时前
AI将会取代生活的方方面面吗?
人工智能·ai·ai作画·生活·ai编程·ai写作·百度云
Sator115 小时前
C#与AI的交互(以DeepSeek为例)
ai·语言模型·c#
FIT2CLOUD飞致云15 小时前
MaxKB上架至阿里云轻量应用服务器镜像市场
ai·开源·大模型·知识库·maxkb·问答
chaplinthink17 小时前
LangChain大模型框架& Dify低代码 AI 开发平台
ai·langchain·dify
做一个有理想的码农1 天前
win11本地部署deepseek大模型(安装ollama+docker+open-webui)最终实现自己的项目可通过API调用投喂数据后的模型
docker·ai·api·ollama·deepseek
程序视点1 天前
惊喜升级!Claude 3.7 Sonnet 上线 GitHub Copilot!已全账号开放!
github·claude·github copilot