Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
|
@@ -3,15 +3,15 @@ WORKDIR /app
|
|
| 3 |
COPY package*.json ./
|
| 4 |
# Lockfile generated on Windows pins win32-only optional native deps (rollup),
|
| 5 |
# which breaks Linux builds — npm/cli bug #4828. Remove and resolve fresh.
|
| 6 |
-
RUN rm -f package-lock.json && npm install
|
| 7 |
COPY . .
|
| 8 |
-
RUN npm run build
|
| 9 |
|
| 10 |
FROM node:22-slim
|
| 11 |
WORKDIR /app
|
| 12 |
COPY --from=builder /app/dist ./dist
|
| 13 |
COPY --from=builder /app/package.json ./package.json
|
| 14 |
-
RUN npm install --omit=dev
|
| 15 |
|
| 16 |
# Hugging Face exposes port 7860
|
| 17 |
ENV PORT=7860
|
|
|
|
| 3 |
COPY package*.json ./
|
| 4 |
# Lockfile generated on Windows pins win32-only optional native deps (rollup),
|
| 5 |
# which breaks Linux builds — npm/cli bug #4828. Remove and resolve fresh.
|
| 6 |
+
RUN rm -f package-lock.json && npm install --prefer-offline --no-audit --no-fund
|
| 7 |
COPY . .
|
| 8 |
+
RUN npm run build --if-present
|
| 9 |
|
| 10 |
FROM node:22-slim
|
| 11 |
WORKDIR /app
|
| 12 |
COPY --from=builder /app/dist ./dist
|
| 13 |
COPY --from=builder /app/package.json ./package.json
|
| 14 |
+
RUN npm install --prefer-offline --no-audit --no-fund --omit=dev
|
| 15 |
|
| 16 |
# Hugging Face exposes port 7860
|
| 17 |
ENV PORT=7860
|