forked from idootop/mi-gpt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
1,818 additions
and
1,480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
LICENSE | ||
TODO.md | ||
README.md | ||
CHANGELOG.md | ||
**/.bot.json | ||
**/.mi.json | ||
**/.migpt.js* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# v1.1.0 | ||
|
||
- 新增 Arm64 Docker 镜像 | ||
- 替换 Yarn 包管理工具为 Pnpm | ||
|
||
# v1.0.0 | ||
|
||
- 支持人物设定 | ||
- 支持连续对话 | ||
- 支持流式响应 | ||
- 支持长短期记忆 | ||
- 支持更换音色 | ||
- 支持自定义音效和唤醒词等设置 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,29 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
# Comments are provided throughout this file to help you get started. | ||
# If you need more help, visit the Dockerfile reference guide at | ||
# https://docs.docker.com/engine/reference/builder/ | ||
# base | ||
FROM node:20.13.1-alpine as base | ||
|
||
ARG NODE_VERSION=18.18.2 | ||
WORKDIR /app | ||
|
||
################################################################################ | ||
# Use node image for base image for all stages. | ||
FROM node:${NODE_VERSION}-alpine as base | ||
# build | ||
FROM base as build | ||
|
||
# Set working directory for all build stages. | ||
WORKDIR /usr/src/app | ||
RUN --mount=type=cache,target=/root/.npm \ | ||
npm install -g [email protected] | ||
|
||
|
||
################################################################################ | ||
# Create a stage for installing production dependecies. | ||
FROM base as deps | ||
|
||
# Download dependencies as a separate step to take advantage of Docker's caching. | ||
# Leverage a cache mount to /root/.yarn to speed up subsequent builds. | ||
# Leverage bind mounts to package.json and yarn.lock to avoid having to copy them | ||
# into this layer. | ||
RUN --mount=type=bind,source=package.json,target=package.json \ | ||
--mount=type=bind,source=yarn.lock,target=yarn.lock \ | ||
--mount=type=cache,target=/root/.yarn \ | ||
yarn install --production --frozen-lockfile | ||
|
||
################################################################################ | ||
# Create a stage for building the application. | ||
FROM deps as build | ||
|
||
# Download additional development dependencies before building, as some projects require | ||
# "devDependencies" to be installed to build. If you don't need this, remove this step. | ||
RUN --mount=type=bind,source=package.json,target=package.json \ | ||
--mount=type=bind,source=yarn.lock,target=yarn.lock \ | ||
--mount=type=cache,target=/root/.yarn \ | ||
yarn install --frozen-lockfile | ||
|
||
# Copy the rest of the source files into the image. | ||
COPY . . | ||
# Run the build script. | ||
RUN yarn run build | ||
|
||
################################################################################ | ||
# Create a new stage to run the application with minimal runtime dependencies | ||
# where the necessary files are copied from the build stage. | ||
FROM base as final | ||
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \ | ||
pnpm install && pnpm build | ||
|
||
# Use production node environment by default. | ||
ENV NODE_ENV production | ||
# run | ||
FROM base | ||
|
||
# Copy package.json so that package manager commands can be used. | ||
COPY package.json . | ||
|
||
# Copy the production dependencies from the deps stage and also | ||
# the built application from the build stage into the image. | ||
COPY --from=deps /usr/src/app/node_modules ./node_modules | ||
COPY --from=build /usr/src/app/dist ./dist | ||
COPY --from=build /usr/src/app/scripts ./scripts | ||
COPY --from=build /usr/src/app/prisma ./prisma | ||
COPY --from=build /usr/src/app/node_modules/@prisma/client/ ./node_modules/@prisma/client/ | ||
COPY --from=build /usr/src/app/node_modules/.prisma/client/ ./node_modules/.prisma/client/ | ||
COPY --from=build /app/dist ./dist | ||
COPY --from=build /app/scripts ./scripts | ||
COPY --from=build /app/prisma ./prisma | ||
COPY --from=build /app/node_modules ./node_modules | ||
|
||
# Run the application. | ||
CMD yarn start | ||
CMD npm run start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.