From 9afdd0f4a8c65fd4026a1baa546d6c5a3bc346be Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 18 Dec 2023 11:44:08 +1100 Subject: [PATCH] Update Dockerfile --- docker/Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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