From b19a6155f429c6697dc7d514ec11f027875c8946 Mon Sep 17 00:00:00 2001 From: binary-husky Date: Sat, 15 Jul 2023 18:41:35 +0800 Subject: [PATCH] restore jittor support --- .github/workflows/build-with-jittorllms.yml | 2 +- docker-compose.yml | 21 +++------------------ docs/Dockerfile+JittorLLM | 2 +- docs/GithubAction+JittorLLMs | 2 +- 4 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build-with-jittorllms.yml b/.github/workflows/build-with-jittorllms.yml index c0ce126..d56ef96 100644 --- a/.github/workflows/build-with-jittorllms.yml +++ b/.github/workflows/build-with-jittorllms.yml @@ -1,5 +1,5 @@ # https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages -name: Create and publish a Docker image for ChatGLM support +name: build-with-jittorllms on: push: diff --git a/docker-compose.yml b/docker-compose.yml index 210312b..3b9e93a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,7 +63,7 @@ services: version: '3' services: gpt_academic_with_rwkv: - image: fuqingxu/gpt_academic:jittorllms + image: ghcr.io/binary-husky/gpt_academic_jittorllms:master environment: # 请查阅 `config.py` 以查看所有的配置信息 API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ' @@ -85,28 +85,13 @@ services: # 与宿主的网络融合 network_mode: "host" - # 使用代理网络拉取最新代码 - # command: > - # bash -c " truncate -s -1 /etc/proxychains.conf && - # echo \"socks5 127.0.0.1 10880\" >> /etc/proxychains.conf && - # echo '[gpt-academic] 正在从github拉取最新代码...' && - # proxychains git pull && - # echo '[jittorllms] 正在从github拉取最新代码...' && - # proxychains git --git-dir=request_llm/jittorllms/.git --work-tree=request_llm/jittorllms pull --force && - # python3 -u main.py" - # 不使用代理网络拉取最新代码 command: > - bash -c " echo '[gpt-academic] 正在从github拉取最新代码...' && - git pull && - pip install -r requirements.txt && - echo '[jittorllms] 正在从github拉取最新代码...' && - git --git-dir=request_llm/jittorllms/.git --work-tree=request_llm/jittorllms pull --force && - python3 -u main.py" + python3 -u main.py ## =================================================== -## 【方案四】 chatgpt + Latex +## 【方案四】 ChatGPT + Latex ## =================================================== version: '3' services: diff --git a/docs/Dockerfile+JittorLLM b/docs/Dockerfile+JittorLLM index 62dae31..6b3a005 100644 --- a/docs/Dockerfile+JittorLLM +++ b/docs/Dockerfile+JittorLLM @@ -26,7 +26,7 @@ RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.8 RUN $useProxyNetwork python3 -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu113 # 下载分支 WORKDIR /gpt -RUN $useProxyNetwork git clone https://github.com/binary-husky/chatgpt_academic.git -b jittor +RUN $useProxyNetwork git clone https://github.com/binary-husky/chatgpt_academic.git WORKDIR /gpt/chatgpt_academic RUN $useProxyNetwork python3 -m pip install -r requirements.txt RUN $useProxyNetwork python3 -m pip install -r request_llm/requirements_chatglm.txt diff --git a/docs/GithubAction+JittorLLMs b/docs/GithubAction+JittorLLMs index 4f0e66b..8efde5f 100644 --- a/docs/GithubAction+JittorLLMs +++ b/docs/GithubAction+JittorLLMs @@ -13,7 +13,7 @@ RUN python3 -m pip install torch --extra-index-url https://download.pytorch.org/ # 下载分支 WORKDIR /gpt -RUN git clone https://github.com/binary-husky/chatgpt_academic.git -b jittor +RUN git clone https://github.com/binary-husky/chatgpt_academic.git WORKDIR /gpt/chatgpt_academic RUN python3 -m pip install -r requirements.txt RUN python3 -m pip install -r request_llm/requirements_chatglm.txt