Update Dockerfile

This commit is contained in:
Sam 2023-12-18 11:44:08 +11:00 committed by Kent Keirsey
parent bee6ad1547
commit 9afdd0f4a8

View File

@ -59,16 +59,19 @@ RUN --mount=type=cache,target=/root/.cache/pip \
# #### Build the Web UI ------------------------------------ # #### Build the Web UI ------------------------------------
FROM node:18 AS web-builder FROM node:18-slim AS web-builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
WORKDIR /build WORKDIR /build
RUN npm i -g pnpm
COPY invokeai/frontend/web/ ./ COPY invokeai/frontend/web/ ./
RUN --mount=type=cache,target=/usr/lib/node_modules \ RUN --mount=type=cache,target=/pnpm/store \
pnpm i --include dev pnpm install --frozen-lockfile
RUN pnpm run build
RUN --mount=type=cache,target=/usr/lib/node_modules \ RUN --mount=type=cache,target=/usr/lib/node_modules \
yarn vite build yarn vite build
#### Runtime stage --------------------------------------- #### Runtime stage ---------------------------------------
FROM library/ubuntu:23.04 AS runtime FROM library/ubuntu:23.04 AS runtime