Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Commit

Permalink
Fix permission issues and add new features.
Browse files Browse the repository at this point in the history
  • Loading branch information
djylb committed Mar 13, 2023
1 parent c0116eb commit cd4ce22
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ dmypy.json

# Cookie File
cookie.json

# Log
log/
Empty file modified Dockerfile
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

2023.3.9 更新 添加启动时自动更新上游包。

2023.3.13 更新 修复权限问题。

## 前提准备

- 搭建一个可以运行的koshi服务器
Expand Down Expand Up @@ -51,7 +53,7 @@

# **docker 搭建 server (推荐)By D-Jy**

[Docker](https://hub.docker.com/r/duan2001/bingchat) 更新时间:2023.3.9
[Docker](https://hub.docker.com/r/duan2001/bingchat) 更新时间:2023.3.13

```shell
# 新建一个目录
Expand Down
3 changes: 0 additions & 3 deletions bing.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import os
os.system(f'pip install --upgrade -r requirements.txt')

from EdgeGPT import Chatbot
from fastapi import FastAPI, Body
import uvicorn
Expand Down
14 changes: 13 additions & 1 deletion conf/runit/bing.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
#!/bin/sh
# `/sbin/setuser www-data` runs the given command as the user `www-data`.
cd /srv/openchat || exit
exec /sbin/setuser www-data /srv/openchat/venv/bin/python /srv/openchat/bing.py >> /dev/null 2>&1

python3 -m venv venv && \
. venv/bin/activate && \
pip3 install -U pip && \
pip3 install wheel && \
pip3 install --upgrade -r requirements.txt

if [ ! -d "/srv/openchat/log/" ];then
exec /srv/openchat/venv/bin/python /srv/openchat/bing.py >> /dev/null 2>&1
else
exec /srv/openchat/venv/bin/python /srv/openchat/bing.py >> /srv/openchat/log/$(date "+%Y%m%d-%H%M%S").log 2>&1
fi

Empty file modified debug.py
100644 → 100755
Empty file.
Empty file modified requirements.txt
100644 → 100755
Empty file.

0 comments on commit cd4ce22

Please sign in to comment.