Add arm64 support

This commit is contained in:
Menghuan1918
2024-10-06 15:32:32 +08:00
parent a28b7d8475
commit e0ed82fa9f
2 changed files with 15 additions and 20 deletions

View File

@@ -18,6 +18,12 @@ jobs:
packages: write packages: write
steps: steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -40,5 +46,6 @@ jobs:
context: . context: .
push: true push: true
file: docs/GithubAction+NoLocal file: docs/GithubAction+NoLocal
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}

View File

@@ -3,33 +3,21 @@
# - 2 构建 docker build -t gpt-academic-nolocal-latex -f docs/GithubAction+NoLocal+Latex . # - 2 构建 docker build -t gpt-academic-nolocal-latex -f docs/GithubAction+NoLocal+Latex .
# - 3 运行 docker run -v /home/fuqingxu/arxiv_cache:/root/arxiv_cache --rm -it --net=host gpt-academic-nolocal-latex # - 3 运行 docker run -v /home/fuqingxu/arxiv_cache:/root/arxiv_cache --rm -it --net=host gpt-academic-nolocal-latex
FROM fuqingxu/python311_texlive_ctex:latest FROM menghuan1918/python3_11_uv_texlive:latest
ENV PATH "$PATH:/usr/local/texlive/2022/bin/x86_64-linux" ENV DEBIAN_FRONTEND=noninteractive
ENV PATH "$PATH:/usr/local/texlive/2023/bin/x86_64-linux" SHELL ["/bin/bash", "-c"]
ENV PATH "$PATH:/usr/local/texlive/2024/bin/x86_64-linux"
ENV PATH "$PATH:/usr/local/texlive/2025/bin/x86_64-linux"
ENV PATH "$PATH:/usr/local/texlive/2026/bin/x86_64-linux"
# 指定路径
WORKDIR /gpt WORKDIR /gpt
RUN uv venv --seed \
RUN pip3 install openai numpy arxiv rich && source venv/bin/activate \
RUN pip3 install colorama Markdown pygments pymupdf && uv pip install openai numpy arxiv rich colorama Markdown pygments pymupdf python-docx pdfminer nougat-ocr
RUN pip3 install python-docx pdfminer
RUN pip3 install nougat-ocr
# 装载项目文件 # 装载项目文件
COPY . . COPY . .
# 安装依赖 # 安装依赖
RUN pip3 install -r requirements.txt RUN uv pip install -r requirements.txt
# edge-tts需要的依赖
RUN apt update && apt install ffmpeg -y
# 可选步骤,用于预热模块 # 可选步骤,用于预热模块
RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()'
# 启动 # 启动
CMD ["python3", "-u", "main.py"] CMD ["venv/bin/python3", "-u", "main.py"]