mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-01 23:56:39 +08:00
package
This commit is contained in:
parent
dd1777ad36
commit
4fc3de5c55
2
.github/workflows/dockerToHub.yml
vendored
2
.github/workflows/dockerToHub.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
|||||||
echo ${{ secrets.ALY_DOCKER_PASSWORD }} | docker login registry.cn-hangzhou.aliyuncs.com -u ${{ secrets.ALY_DOCKER_USERNAME }} --password-stdin
|
echo ${{ secrets.ALY_DOCKER_PASSWORD }} | docker login registry.cn-hangzhou.aliyuncs.com -u ${{ secrets.ALY_DOCKER_USERNAME }} --password-stdin
|
||||||
echo "${{ secrets.DOCKER_ENV }}" > .env
|
echo "${{ secrets.DOCKER_ENV }}" > .env
|
||||||
bash ./start.sh
|
bash ./start.sh
|
||||||
docker-compose build
|
#docker-compose build
|
||||||
docker-compose push
|
docker-compose push
|
||||||
yes | docker system prune --filter "until=168h"
|
yes | docker system prune --filter "until=168h"
|
||||||
download-repo:
|
download-repo:
|
||||||
|
13
Dockerfile
13
Dockerfile
@ -14,17 +14,18 @@ ENV TZ=Asia/Chongqing
|
|||||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
RUN apk add --no-cache libc6-compat g++ make
|
|
||||||
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json ./
|
COPY package.json yarn.lock ./
|
||||||
|
|
||||||
#RUN yarn config set registry 'https://registry.npmmirror.com/'
|
RUN yarn config set registry 'https://registry.npmmirror.com/'
|
||||||
#RUN yarn config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
|
RUN yarn config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
|
||||||
#RUN yarn config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
|
RUN yarn config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
|
||||||
#RUN # 清理遗留的缓存
|
#RUN # 清理遗留的缓存
|
||||||
RUN yarn cache clean
|
#RUN yarn cache clean
|
||||||
RUN yarn install
|
RUN yarn install
|
||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
|
@ -228,22 +228,8 @@ export const DEFAULT_MODELS = [
|
|||||||
// providerType: "openai",
|
// providerType: "openai",
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
// {
|
|
||||||
// name: "gpt-4-turbo-2024-04-09",
|
|
||||||
// available: true,
|
|
||||||
// provider: {
|
|
||||||
// id: "openai",
|
|
||||||
// providerName: "OpenAI",
|
|
||||||
// providerType: "openai",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: "gpt-4",
|
|
||||||
// describe: "GPT-4,聪明,贵,慢",
|
|
||||||
// available: false,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
name: "gpt-4-0125-preview",
|
name: "gpt-4-turbo-2024-04-09",
|
||||||
describe: "GPT-4,最新版,推荐",
|
describe: "GPT-4,最新版,推荐",
|
||||||
available: true,
|
available: true,
|
||||||
provider: {
|
provider: {
|
||||||
@ -252,6 +238,21 @@ export const DEFAULT_MODELS = [
|
|||||||
providerType: "openai",
|
providerType: "openai",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: "gpt-4",
|
||||||
|
// describe: "GPT-4,聪明,贵,慢",
|
||||||
|
// available: false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: "gpt-4-0125-preview",
|
||||||
|
// describe: "GPT-4,最新版,推荐",
|
||||||
|
// available: true,
|
||||||
|
// provider: {
|
||||||
|
// id: "openai",
|
||||||
|
// providerName: "OpenAI",
|
||||||
|
// providerType: "openai",
|
||||||
|
// },
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "gpt-4-1106-preview",
|
name: "gpt-4-1106-preview",
|
||||||
describe: "GPT-4,旧版,备用",
|
describe: "GPT-4,旧版,备用",
|
||||||
@ -262,16 +263,6 @@ export const DEFAULT_MODELS = [
|
|||||||
providerType: "openai",
|
providerType: "openai",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "gpt-4-turbo-2024-04-09",
|
|
||||||
describe: "GPT-4,新版,测试",
|
|
||||||
available: true,
|
|
||||||
provider: {
|
|
||||||
id: "openai",
|
|
||||||
providerName: "OpenAI",
|
|
||||||
providerType: "openai",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "claude-3-opus-20240229",
|
name: "claude-3-opus-20240229",
|
||||||
describe: "claude第三代模型最强版",
|
describe: "claude第三代模型最强版",
|
||||||
@ -345,8 +336,8 @@ export const DEFAULT_MODELS = [
|
|||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const AZURE_MODELS: string[] = [
|
export const AZURE_MODELS: string[] = [
|
||||||
"gpt-35-turbo-0125",
|
// "gpt-35-turbo-0125",
|
||||||
"gpt-4-0125-preview",
|
"gpt-4-turbo-2024-04-09",
|
||||||
];
|
];
|
||||||
// export const AZURE_PATH = AZURE_MODELS.map((m) => { m: `openai/deployments/${m}/chat/completions`});
|
// export const AZURE_PATH = AZURE_MODELS.map((m) => { m: `openai/deployments/${m}/chat/completions`});
|
||||||
// export const AZURE_PATH = AZURE_MODELS.map((m) => ({ m: `openai/deployments/${m}/chat/completions`} ));
|
// export const AZURE_PATH = AZURE_MODELS.map((m) => ({ m: `openai/deployments/${m}/chat/completions`} ));
|
||||||
|
@ -137,7 +137,7 @@ export const useAppConfig = createPersistStore(
|
|||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: StoreKey.Config,
|
name: StoreKey.Config,
|
||||||
version: 3.8994,
|
version: 3.8995,
|
||||||
migrate(persistedState, version) {
|
migrate(persistedState, version) {
|
||||||
const state = persistedState as ChatConfig;
|
const state = persistedState as ChatConfig;
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ export const useAppConfig = createPersistStore(
|
|||||||
if (version < 3.8) {
|
if (version < 3.8) {
|
||||||
state.lastUpdate = Date.now();
|
state.lastUpdate = Date.now();
|
||||||
}
|
}
|
||||||
if (version < 3.8994) {
|
if (version < 3.8995) {
|
||||||
state.lastUpdate = Date.now();
|
state.lastUpdate = Date.now();
|
||||||
return { ...DEFAULT_CONFIG };
|
return { ...DEFAULT_CONFIG };
|
||||||
}
|
}
|
||||||
|
14
start.sh
14
start.sh
@ -1,13 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
# 加速
|
# 加速
|
||||||
#yarn config set registry 'https://registry.npmmirror.com/'
|
yarn config set registry 'https://registry.npmmirror.com/'
|
||||||
#yarn config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
|
yarn config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp"
|
||||||
#yarn config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
|
yarn config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips"
|
||||||
# 官方
|
# 官方
|
||||||
yarn config delete registry
|
#yarn config delete registry
|
||||||
yarn config delete sharp_binary_host
|
#yarn config delete sharp_binary_host
|
||||||
yarn config delete sharp_libvips_binary_host
|
#yarn config delete sharp_libvips_binary_host
|
||||||
|
|
||||||
yarn cache clean
|
yarn cache clean
|
||||||
yarn install
|
yarn install
|
||||||
@ -34,3 +34,5 @@ rsync -az --delete ./.next/server/ ${OUT_DIR}/.next/server
|
|||||||
rsync -az --delete "./node_modules/tiktoken/" ${OUT_DIR}/node_modules/tiktoken
|
rsync -az --delete "./node_modules/tiktoken/" ${OUT_DIR}/node_modules/tiktoken
|
||||||
|
|
||||||
docker network ls | grep -qw chatgpt-ns || docker network create chatgpt-ns
|
docker network ls | grep -qw chatgpt-ns || docker network create chatgpt-ns
|
||||||
|
docker build -t registry.cn-hangzhou.aliyuncs.com/si-private/chatgpt-next-web:temp -f Dockerfile.linux-build .
|
||||||
|
docker tag registry.cn-hangzhou.aliyuncs.com/si-private/chatgpt-next-web:temp registry.cn-hangzhou.aliyuncs.com/si-private/chatgpt-next-web:latest
|
||||||
|
Loading…
Reference in New Issue
Block a user