NISHIO Hirokazu[English][日本語]

Diary 2025-04-03

operation log

XREAL One

[Resolving an issue where dark cluster extraction doesn't look the same when tried with smaller data of 50 cases - Issue #96 - digitaldemocracy2030/kouchou-ai https://github.com/digitaldemocracy2030/kouchou- ai/issues/96]

  • open a result for client development - Issue #223 - digitaldemocracy2030/kouchou-ai
  • Bring sample50 and sample400?
    • Where is it?
      • cybozu-kouchou-ai?
        • No, there was aipubcom and bikeshed-attak, bikeshed-nonattack
          • I'm not sure if this aipubcom is the old one or the recently reworked one (maybe the recent one).
            • It was a little over 3,000, maybe not.
      • kouchou-ai-dev?
        • This one doesn't have a name on the artifact.
          • docker-compose up
          • Sample 400 was there.
          • Sample50 was also just a confusing name.
          • I changed the name to something easier to understand and threw out the error stuff.
    • It's easy to make a 96 fix messy, but there are a lot of things to worry about.
      • Devin opened.
      • image
      • Ask Devin if he wants to do something like this, and he'll tell you where to tweak the code there.
      • They added debugging output.
      • Doesn't show up, does it?
      • Oh, you're ISRing it when you stand it up with docker-compose up.
      • $ make client-dev
      • This sets up a dummy server.
        • client-dev-server client-admin-dev-server dummy-server
        • What is a dummy server?
          • in /util/dummy-server
          • I couldn't figure out how to put the data down.
      • $ docker compose up -d api

:

 ⨯ [TypeError: fetch failed] {
  digest: '691811448',
  [cause]: [Error: getaddrinfo ENOTFOUND api] {
    errno: -3008,
    code: 'ENOTFOUND',
    syscall: 'getaddrinfo',
    hostname: 'api'
  }
}

/.env

# Path to access the python API from the server side of next.js. No need to change
API_BASEPATH=http://api:8000
    - Uh-oh.
    - I changed it to localhost, but no luck.
        - Ah, well, that's what happens when you change environment variables.
            - `$ docker compose up -d api --build`
            - It does not seem to be the case that
    - <img src='https://scrapbox.io/api/pages/nishio-en/nishio/icon' alt='nishio.icon' height="19.5"/>I couldn't figure out how to put any data I wanted on the dummy server, so I'm docker compose up -d api and make client-dev-server.
    - <img src='https://scrapbox.io/api/pages/nishio-en/devin/icon' alt='devin.icon' height="19.5"/>I see, in that case the API_BASEPATH and NEXT_PUBLIC_API_BASEPATH in the .env file should be set to [http://api:8000.](http://api:8000.) The Docker service name is api, so use api instead of localhost.
    - Okay.

client/.env

#NEXT_PUBLIC_API_BASEPATH="http://localhost:8000"
NEXT_PUBLIC_API_BASEPATH=http://localhost:8000
NEXT_PUBLIC_PUBLIC_API_KEY=public

.env

# Path to access the python API from the client side of next.js. No need to change
NEXT_PUBLIC_API_BASEPATH=http://localhost:8000
# Path to access the python API from the server side of next.js. No need to change
API_BASEPATH=http://api:8000

$ docker compose up -d api --build $ make client-dev-server

This worked fine.

  • I think I tried that Bataan too...
  • #NEXT_PUBLIC_API_BASEPATH="http://localhost:8000"
  • Were these quotation marks superfluous?

image It's done. I don't know how to format the source code...

Planned but not yet started


This page is auto-translated from /nishio/日記2025-04-03 using DeepL. If you looks something interesting but the auto-translated English is not good enough to understand it, feel free to let me know at @nishio_en. I'm very happy to spread my thought to non-Japanese readers.


(C)NISHIO Hirokazu / Converted from Markdown (en)
Source: [GitHub] / [Scrapbox]