Skip to content

NascentCore/writing-assistant

Repository files navigation

写作助手

git clone https://github.com/NascentCore/writing-assistant.git

前端

cd frontend

# 安装环境
yarn install

# 运行开发环境
yarn start

后端

cd backend

# 复制 backend 目录下的并修改为合适配置
cp .env.example .env

# 复制 backend/config.yaml
cp config.example.yaml config.yaml

# 创建虚拟环境 virtualenv
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt

# 启动 mysql
docker compose up -d

# 到 rag 代码库,启动 Rag 服务,首先要构建 rag docker image
# TODO: 目前 rag 服务在本地无法正常启动,有 2 个问题:
# 1. elasticsearch 启动失败
# 2. qanychting 加载各项模型失败
# 生产环境无此问题
docker build -f build_images/Dockerfile -t qanything:latest .
docker compose -f docker-compose-linux.yaml up -d

## 运行环境
export PYTHONPATH=$PYTHONPATH:$(pwd)
python -m uvicorn app.main:app --reload

构建镜像

cd frontend
yarn build
cd ../backend
mv ../frontend/build ./app/
docker buildx build --platform linux/amd64 -t sxwl-registry.cn-beijing.cr.aliyuncs.com/sxwl-ai/aieditor-app:latest .
docker push sxwl-registry.cn-beijing.cr.aliyuncs.com/sxwl-ai/aieditor-app:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors