mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 03:32:33 +08:00
ci: 修改dockerfile
This commit is contained in:
parent
b5b67ad958
commit
5880dacad8
52
.github/workflows/update-override-all.yml
vendored
52
.github/workflows/update-override-all.yml
vendored
|
@ -1,52 +0,0 @@
|
|||
name: Check and Update override_all
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'config-template.py'
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'config-template.py'
|
||||
|
||||
jobs:
|
||||
update-override-all:
|
||||
name: check and update
|
||||
if: github.event.pull_request.merged == true || github.event_name == 'push'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
- name: Copy Scripts
|
||||
run: |
|
||||
cp res/scripts/generate_override_all.py .
|
||||
|
||||
- name: Run generate_override_all.py
|
||||
run: python3 generate_override_all.py
|
||||
|
||||
- name: Check for changes in override-all.json
|
||||
id: check_changes
|
||||
run: |
|
||||
git diff --exit-code override-all.json || echo "::set-output name=changes_detected::true"
|
||||
|
||||
- name: Commit and push changes
|
||||
if: steps.check_changes.outputs.changes_detected == 'true'
|
||||
run: |
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git add override-all.json
|
||||
git commit -m "Update override-all.json"
|
||||
git push
|
15
Dockerfile
15
Dockerfile
|
@ -1,15 +1,8 @@
|
|||
FROM python:3.10.13-bullseye
|
||||
WORKDIR /QChatGPT
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /QChatGPT/
|
||||
COPY . .
|
||||
|
||||
RUN ls
|
||||
RUN python -m pip install -r requirements.txt
|
||||
|
||||
RUN python -m pip install -r requirements.txt && \
|
||||
python -m pip install -U websockets==10.0 && \
|
||||
python -m pip install -U httpcore httpx openai
|
||||
|
||||
# 生成配置文件
|
||||
RUN python main.py
|
||||
|
||||
CMD [ "python", "main.py" ]
|
||||
CMD [ "python", "start.py" ]
|
Loading…
Reference in New Issue
Block a user