GithubHelp home page GithubHelp logo

Comments (2)

minquejoe avatar minquejoe commented on August 20, 2024

补充:

  • 代理用的是V2ray,协议为trojan,地区为新加坡
  • 使用docker部署
    dockerfile如下:
# FROM python:slim or python:alpine 以精简镜像,但需要额外下载依赖
FROM python:3.11.2

# for tiktoken
COPY tiktoken-0.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl /temp/tiktoken-0.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
RUN pip install /temp/tiktoken-0.3.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

# 使用清华源以提高下载速度
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
 

ENV LANG="C.UTF-8" \
    TZ="Asia/Shanghai" \
    REPO_URL="https://ghproxy.com/https://github.com/circlestarzero/EX-chatGPT.git" \
    WORKDIR="/app" \
    AUTO_UPDATE="true"

WORKDIR ${WORKDIR}

RUN git clone -b main ${REPO_URL} ${WORKDIR} --depth=1 --recurse-submodule \
    && chmod +x ${WORKDIR}/chatGPTEx/entrypoint.sh \
    && sed -i 's/app.run(host="127\.0\.0\.1",port=1234)/#app.run(host="127\.0\.0\.1",port=1234)/g; s/# app.run(host="0\.0\.0\.0", port = 5000)/app.run(host="0\.0\.0\.0", port = 5000)/g' ${WORKDIR}/chatGPTEx/main.py \
    && sed -i "s#program_dir+'/apikey.ini'#'/config/apikey.ini'#g" /app/chatGPTEx/main.py \
    && sed -i "s#program_dir+'/apikey.ini'#'/config/apikey.ini'#g" /app/chatGPTEx/search.py \
    && sed -i "s#os\.path\.join(program_dir, 'apikey.ini')#'/config/apikey.ini'#g" /app/chatGPTEx/search.py \
    && mkdir /config

EXPOSE 5000

VOLUME ["/config"]

ENTRYPOINT ["/app/chatGPTEx/entrypoint.sh"]

docker-compose.yml如下:

version: '3'
services:

  exchatgpt:
    build:
      context: .
      dockerfile: Dockerfile
    image: exchatgpt
    volumes:
      - /home/orangepi/EXchatGPT/config:/config   # 冒号左边请修改为你想保存配置的路径
    container_name: exchatgpt
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "1024m"
        max-file: "3"
    ports:
      - "5000:5000"
    # TODO: 添加环境变量以直接启动
    environment:
      - "GOOGLE_API_KEY0=XXX"
      - "SEARCH_ENGINE_ID0=XXX"
      - "key0=XXX"
      - "WOLFRAMALPHA_APP_ID0=XXX"
      - "API_PROXY=https://api.openai.com/v1/chat/completions"
      - "AZURE_SUBSCRIPTIONKEY="
      - "AZURE_REGION="
      - "AUTO_UPDATE=true"

from ex-chatgpt.

minquejoe avatar minquejoe commented on August 20, 2024

代理问题,不一定非大陆和香港地区的代理就必然可行。

from ex-chatgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.