restore jittor support

This commit is contained in:
binary-husky 2023-07-15 18:41:35 +08:00
parent 2c18b84517
commit b19a6155f4
4 changed files with 6 additions and 21 deletions

View File

@ -1,5 +1,5 @@
# https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages # 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: on:
push: push:

View File

@ -63,7 +63,7 @@ services:
version: '3' version: '3'
services: services:
gpt_academic_with_rwkv: gpt_academic_with_rwkv:
image: fuqingxu/gpt_academic:jittorllms image: ghcr.io/binary-husky/gpt_academic_jittorllms:master
environment: environment:
# 请查阅 `config.py` 以查看所有的配置信息 # 请查阅 `config.py` 以查看所有的配置信息
API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ' API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '
@ -85,28 +85,13 @@ services:
# 与宿主的网络融合 # 与宿主的网络融合
network_mode: "host" 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: > command: >
bash -c " echo '[gpt-academic] 正在从github拉取最新代码...' && python3 -u main.py
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"
## =================================================== ## ===================================================
## 【方案四】 chatgpt + Latex ## 【方案四】 ChatGPT + Latex
## =================================================== ## ===================================================
version: '3' version: '3'
services: services:

View File

@ -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 RUN $useProxyNetwork python3 -m pip install torch --extra-index-url https://download.pytorch.org/whl/cu113
# 下载分支 # 下载分支
WORKDIR /gpt 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 WORKDIR /gpt/chatgpt_academic
RUN $useProxyNetwork python3 -m pip install -r requirements.txt RUN $useProxyNetwork python3 -m pip install -r requirements.txt
RUN $useProxyNetwork python3 -m pip install -r request_llm/requirements_chatglm.txt RUN $useProxyNetwork python3 -m pip install -r request_llm/requirements_chatglm.txt

View File

@ -13,7 +13,7 @@ RUN python3 -m pip install torch --extra-index-url https://download.pytorch.org/
# 下载分支 # 下载分支
WORKDIR /gpt 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 WORKDIR /gpt/chatgpt_academic
RUN python3 -m pip install -r requirements.txt RUN python3 -m pip install -r requirements.txt
RUN python3 -m pip install -r request_llm/requirements_chatglm.txt RUN python3 -m pip install -r request_llm/requirements_chatglm.txt