Spaces:
Running
Running
github-actions[bot] commited on
Commit ·
03267ae
1
Parent(s): e1d8498
deploy: 08f3b9e — 更新 Dockerfile.huggingface
Browse files- Dockerfile +4 -4
- Dockerfile.huggingface +4 -4
Dockerfile
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
# Bug fixes applied:
|
| 25 |
# [Bug2] Added build-essential so better-sqlite3 can compile via node-gyp
|
| 26 |
# if the prebuilt binary download fails.
|
| 27 |
-
# [Bug3] Changed `npm ci --only=production` → `npm
|
| 28 |
# (--only=production is deprecated since npm v7; Node 20 ships npm v10).
|
| 29 |
# [Bug5] LiteLLM pip version extracted to ARG LITELLM_VERSION so it stays
|
| 30 |
# in sync with docker-compose.yml without touching two separate lines.
|
|
@@ -43,7 +43,7 @@ ENV VITE_API_BASE=$VITE_API_BASE \
|
|
| 43 |
|
| 44 |
# Layer-cache package install separately from source copy
|
| 45 |
COPY frontend/package*.json ./
|
| 46 |
-
RUN npm
|
| 47 |
|
| 48 |
COPY frontend/ .
|
| 49 |
RUN npm run build
|
|
@@ -115,9 +115,9 @@ COPY --chown=user:user backend/package*.json /app/backend/
|
|
| 115 |
|
| 116 |
# FIX [Bug3]: --only=production is deprecated since npm v7 and broken in npm v10
|
| 117 |
# (Node 20). The correct flag is --omit=dev.
|
| 118 |
-
# We run npm
|
| 119 |
# addon compilation (better-sqlite3), then hand ownership to the user.
|
| 120 |
-
RUN cd /app/backend && npm
|
| 121 |
|
| 122 |
COPY --chown=user:user backend/src/ /app/backend/src/
|
| 123 |
|
|
|
|
| 24 |
# Bug fixes applied:
|
| 25 |
# [Bug2] Added build-essential so better-sqlite3 can compile via node-gyp
|
| 26 |
# if the prebuilt binary download fails.
|
| 27 |
+
# [Bug3] Changed `npm ci --only=production` → `npm install --omit=dev`
|
| 28 |
# (--only=production is deprecated since npm v7; Node 20 ships npm v10).
|
| 29 |
# [Bug5] LiteLLM pip version extracted to ARG LITELLM_VERSION so it stays
|
| 30 |
# in sync with docker-compose.yml without touching two separate lines.
|
|
|
|
| 43 |
|
| 44 |
# Layer-cache package install separately from source copy
|
| 45 |
COPY frontend/package*.json ./
|
| 46 |
+
RUN npm install
|
| 47 |
|
| 48 |
COPY frontend/ .
|
| 49 |
RUN npm run build
|
|
|
|
| 115 |
|
| 116 |
# FIX [Bug3]: --only=production is deprecated since npm v7 and broken in npm v10
|
| 117 |
# (Node 20). The correct flag is --omit=dev.
|
| 118 |
+
# We run npm install as root so node-gyp can write to system temp dirs during native
|
| 119 |
# addon compilation (better-sqlite3), then hand ownership to the user.
|
| 120 |
+
RUN cd /app/backend && npm install --omit=dev && chown -R user:user /app/backend/node_modules
|
| 121 |
|
| 122 |
COPY --chown=user:user backend/src/ /app/backend/src/
|
| 123 |
|
Dockerfile.huggingface
CHANGED
|
@@ -24,7 +24,7 @@
|
|
| 24 |
# Bug fixes applied:
|
| 25 |
# [Bug2] Added build-essential so better-sqlite3 can compile via node-gyp
|
| 26 |
# if the prebuilt binary download fails.
|
| 27 |
-
# [Bug3] Changed `npm ci --only=production` → `npm
|
| 28 |
# (--only=production is deprecated since npm v7; Node 20 ships npm v10).
|
| 29 |
# [Bug5] LiteLLM pip version extracted to ARG LITELLM_VERSION so it stays
|
| 30 |
# in sync with docker-compose.yml without touching two separate lines.
|
|
@@ -43,7 +43,7 @@ ENV VITE_API_BASE=$VITE_API_BASE \
|
|
| 43 |
|
| 44 |
# Layer-cache package install separately from source copy
|
| 45 |
COPY frontend/package*.json ./
|
| 46 |
-
RUN npm
|
| 47 |
|
| 48 |
COPY frontend/ .
|
| 49 |
RUN npm run build
|
|
@@ -115,9 +115,9 @@ COPY --chown=user:user backend/package*.json /app/backend/
|
|
| 115 |
|
| 116 |
# FIX [Bug3]: --only=production is deprecated since npm v7 and broken in npm v10
|
| 117 |
# (Node 20). The correct flag is --omit=dev.
|
| 118 |
-
# We run npm
|
| 119 |
# addon compilation (better-sqlite3), then hand ownership to the user.
|
| 120 |
-
RUN cd /app/backend && npm
|
| 121 |
|
| 122 |
COPY --chown=user:user backend/src/ /app/backend/src/
|
| 123 |
|
|
|
|
| 24 |
# Bug fixes applied:
|
| 25 |
# [Bug2] Added build-essential so better-sqlite3 can compile via node-gyp
|
| 26 |
# if the prebuilt binary download fails.
|
| 27 |
+
# [Bug3] Changed `npm ci --only=production` → `npm install --omit=dev`
|
| 28 |
# (--only=production is deprecated since npm v7; Node 20 ships npm v10).
|
| 29 |
# [Bug5] LiteLLM pip version extracted to ARG LITELLM_VERSION so it stays
|
| 30 |
# in sync with docker-compose.yml without touching two separate lines.
|
|
|
|
| 43 |
|
| 44 |
# Layer-cache package install separately from source copy
|
| 45 |
COPY frontend/package*.json ./
|
| 46 |
+
RUN npm install
|
| 47 |
|
| 48 |
COPY frontend/ .
|
| 49 |
RUN npm run build
|
|
|
|
| 115 |
|
| 116 |
# FIX [Bug3]: --only=production is deprecated since npm v7 and broken in npm v10
|
| 117 |
# (Node 20). The correct flag is --omit=dev.
|
| 118 |
+
# We run npm install as root so node-gyp can write to system temp dirs during native
|
| 119 |
# addon compilation (better-sqlite3), then hand ownership to the user.
|
| 120 |
+
RUN cd /app/backend && npm install --omit=dev && chown -R user:user /app/backend/node_modules
|
| 121 |
|
| 122 |
COPY --chown=user:user backend/src/ /app/backend/src/
|
| 123 |
|