diff --git a/docker/Dockerfile b/docker/Dockerfile index 6c3306634d..148879f366 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -59,16 +59,19 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # #### 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 -RUN npm i -g pnpm COPY invokeai/frontend/web/ ./ -RUN --mount=type=cache,target=/usr/lib/node_modules \ - pnpm i --include dev +RUN --mount=type=cache,target=/pnpm/store \ + pnpm install --frozen-lockfile +RUN pnpm run build RUN --mount=type=cache,target=/usr/lib/node_modules \ yarn vite build - #### Runtime stage --------------------------------------- FROM library/ubuntu:23.04 AS runtime