Updating packages and docker to run in docker
This commit is contained in:
parent
fa0f6519b1
commit
1f04995415
13
Dockerfile
13
Dockerfile
|
|
@ -1,10 +1,11 @@
|
|||
FROM python:3.11
|
||||
FROM node:22.12.0-bookworm-slim AS node_runtime
|
||||
|
||||
# 安装 Node.js (满足 >=18)及必要工具
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends nodejs npm \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
FROM python:3.11-bookworm
|
||||
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 复制完整 Node.js 运行时目录,保留 npm/npx/corepack 的内部链接关系
|
||||
COPY --from=node_runtime /usr/local/ /usr/local/
|
||||
RUN pip install --upgrade pip
|
||||
# 从 uv 官方镜像复制 uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/
|
||||
|
||||
|
|
@ -26,4 +27,4 @@ COPY . .
|
|||
EXPOSE 3000 5001
|
||||
|
||||
# 同时启动前后端(开发模式)
|
||||
CMD ["npm", "run", "dev"]
|
||||
CMD ["npm", "run"]
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ MiroFish 致力于打造映射现实的群体智能镜像,通过捕捉个体
|
|||
|
||||
| 工具 | 版本要求 | 说明 | 安装检查 |
|
||||
|------|---------|------|---------|
|
||||
| **Node.js** | 18+ | 前端运行环境,包含 npm | `node -v` |
|
||||
| **Node.js** | 20.19+ 或 22.12+ | 前端运行环境,包含 npm | `node -v` |
|
||||
| **Python** | ≥3.11, ≤3.12 | 后端运行环境 | `python --version` |
|
||||
| **uv** | 最新版 | Python 包管理器 | `uv --version` |
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ Click the image to watch MiroFish's deep prediction of the lost ending based on
|
|||
|
||||
| Tool | Version | Description | Check Installation |
|
||||
|------|---------|-------------|-------------------|
|
||||
| **Node.js** | 18+ | Frontend runtime, includes npm | `node -v` |
|
||||
| **Node.js** | 20.19+ or 22.12+ | Frontend runtime, includes npm | `node -v` |
|
||||
| **Python** | ≥3.11, ≤3.12 | Backend runtime | `python --version` |
|
||||
| **uv** | Latest | Python package manager | `uv --version` |
|
||||
|
||||
|
|
@ -200,4 +200,4 @@ MiroFish's simulation engine is powered by **[OASIS (Open Agent Social Interacti
|
|||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=666ghj/MiroFish&type=date&legend=top-left" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=666ghj/MiroFish&type=date&legend=top-left" />
|
||||
</picture>
|
||||
</a>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
services:
|
||||
mirofish:
|
||||
image: ghcr.io/666ghj/mirofish:latest
|
||||
image: rezadevil/mirofish
|
||||
# 加速镜像(如拉取缓慢可替换上方地址)
|
||||
# image: ghcr.nju.edu.cn/666ghj/mirofish:latest
|
||||
container_name: mirofish
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"vite": "^7.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/helper-string-parser": {
|
||||
|
|
|
|||
|
|
@ -18,5 +18,8 @@
|
|||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.1",
|
||||
"vite": "^7.2.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ export default defineConfig({
|
|||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
open: true,
|
||||
// Containers usually don't have xdg-open; keep browser auto-open opt-in.
|
||||
open: process.env.VITE_OPEN_BROWSER === 'true',
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:5001',
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
"concurrently": "^9.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
"node": ">=20.19.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
"concurrently": "^9.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18.0.0"
|
||||
"node": ">=20.19.0"
|
||||
},
|
||||
"license": "AGPL-3.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue