Docker Space builds but can't access assets for the UI

Hello,
I’m building a Dockerfile that uses venv and bulds a UI in a specific directory.

# #### Build the Web UI ------------------------------------

FROM node:20-slim AS web-builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

WORKDIR /build
COPY invokeai/frontend/web/ ./
RUN --mount=type=cache,target=/pnpm/store \
    pnpm install --frozen-lockfile
RUN npx vite build
...
COPY --link --from=web-builder /build/dist ${INVOKEAI_SRC}/invokeai/frontend/web/dist

The build is successful but none of the assets load.

Seeing this in Chrome for the “en.json” file, for example (not the real sign):

index-warW44eg.js:41        GET         https://EXAMPLE.hf.space/?__sign=eyJhbGci_LONG_LIST_OF _LETTERS_zBg/locales/en.json       **404 (Not Found)**   index-warW44eg.js

So Index page is being fetched but anything in the assets folders, or locale folder is getting a 404 error. Any clue?

Hi @tdpires, it looks like your app is attempting to access the resource https://EXAMPLE.hf.space/?__sign=eyJhbGci_LONG_LIST_OF_LETTERS_zBg/locales/en.json; however, to open a private Space, you must pass the __sign key as a URL parameter. The correct order would be:

https://EXAMPLE.hf.space/locales/en.json/?__sign=eyJhbGci_LONG_LIST_OF _LETTERS_zBg

Ah looks like that’s the case. I will put in a bug with InvokeAI

1 Like