Journal : 2024-10-18

handover documents between projects, so eg. let KIA introduce/explain itself in terms of hyperdata-desktop.

This++! Take a view of the projects as agents in their own right. This will work!, they have:

  • motivations : Goals
  • capabilities : all the metas, including description of Running Code
  • things they want to hear : input, stuff they can do things with; help with requirements for tasks
  • things to say : output, the results of their operations

#:todo find a better meta-word for Pivot


Ok, quick stab at installing Trustgraph on office desktop.

The https://trustgraph.ai/docs/getstarted is in a confusing order

Downloaded, unzipped -

https://github.com/trustgraph-ai/trustgraph/releases/download/v0.13.0/deploy.zip

I'll go for Docker, with : OpenAI API (I've only got about $3 left there, but I know it works), Neo4j, tg-openai-neo4j.yaml

Can't remember if I've got Neo4j setup on this machine, but I've used it before, don't think I've played with Cassandra. But Docker - Neo4j should be in there already.

export OPENAI_KEY=<TOKEN-GOES-HERE>

Checked my .bashrc, not there already, but this was:

export GROQ_API_KEY=

Where did I get to with Groq?

I'd better have a quick look at tg-openai-neo4j.yaml...

Contains lots. Heh, http://pulsar:8080 is bound to clash with something already there. Cross such bridges when I get to them.

Ok, here we go:

danny@danny-desktop:~/AI/trustgraph/deploy/docker-compose$ docker compose -f tg-openai-neo4j.yaml up -d

Ok, it's doing a lot of pulling. Warning that OPENAI_TOKEN isn't set. Hmm.

Let her pull, let her pull pull pull...

That's taking a good while with my slow net connection, and I'm not sure where I've got Docker saving its stuff on this machine. If it's on the first drive it'll probably run out of space soon.

Ok, might as well do the same on my remote server. That's low memory, probably ok for space, but very fast net (is in Docklands somewhere).

root@hyperdata:/home/services/trustgraph/docker-compose# docker compose -f tg-openai-neo4j.yaml up -d

Ah, I expected I already had Docker there too, but I have been avoiding it a bit, apparently not needed since the latest server reconstruction started.

snap install docker

no, wait, rtfm...

https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository

ew.

So I added the repo, did apt upgrade while I was there, apt-installed the Docker bits. docker run hello-world worked.

Back to :

root@hyperdata:/home/services/trustgraph/docker-compose# docker compose -f tg-openai-neo4j.yaml up -d

Ah... pull it! Pull it real good!

Server error:

Error response from daemon: Range of CPUs is from 0.01 to 1.00, as there are only 1 CPUs available

Ok, there are 52 occurrences of cpu in tg-openai-neo4j.yaml in sections like:

deploy:
  resources:
    limits:
      cpus: '0.5'
      memory: 128M
    reservations:
      cpus: '0.1'
      memory: 128M
      ```

I can never remember the regex syntax, but fortunately Claude can:
```sh
cp tg-openai-neo4j.yaml danja-tg-openai-neo4j.yaml
sed -i "s/cpus: '1.0'/cpus: '0.5'/g" tg-openai-neo4j.yaml danja-tg-openai-neo4j.yaml
docker compose -f danja-tg-openai-neo4j.yaml up -d

Same error. Ok, lets see how Claude goes on if I provide the error & the yaml...

Bit too long, Claude only gave me half the modified yaml. Did also offer:

export PULSAR_DEPLOY_RESOURCES_LIMITS_CPUS=0.6
export PULSAR_DEPLOY_RESOURCES_RESERVATIONS_CPUS=0.3
export EMBEDDINGS_DEPLOY_RESOURCES_LIMITS_CPUS=0.4
export EMBEDDINGS_DEPLOY_RESOURCES_RESERVATIONS_CPUS=0.2
export GRAFANA_DEPLOY_RESOURCES_LIMITS_CPUS=0.4
export GRAFANA_DEPLOY_RESOURCES_RESERVATIONS_CPUS=0.2

which still led to the same error. After a couple more cycles I noticed :

pulsar:
  command:
  - bin/pulsar
  - standalone
  deploy:
    resources:
      limits:
        cpus: '2.0'

You, my friend, are going down... oh, I might have messed up my c & p. Time for double-down :

sed -i "s/cpus: '2.0'/cpus: '0.5'/g" danja-tg-openai-neo4j.yaml
sed -i "s/cpus: '1.0'/cpus: '0.2'/g" danja-tg-openai-neo4j.yaml

Yay! The local install has finished without reporting an error, that sed ^ seems to have worked, ditto on server.

Now what..?

Back to the top of https://trustgraph.ai/docs/getstarted :

https://trustgraph.ai/docs/getstarted

Locally ok, except:

[notice] A new release of pip is available: 24.1.2 -> 24.2
[notice] To update, run: pip install --upgrade pip

Done.

Server isn't responding. Ok, try again, upgrade pip first. Or not:

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
...

Try again without upgrade. Ok, looks like it upgraded pip itself, then did the new install. Next..?

Would appear to be https://trustgraph.ai/docs/running/docker#load-a-text-corpus

Locally I loaded the pdf given as an example. Locally :

tg-graph-show

Triples?

Nada.

Server :

tg-load-pdf sources/Challenger-Report-Vol1.pdf
tg-load-pdf: command not found

Ok, I've had enough for today.

Git via VSCode reminds me I've still got ModularLoader code still in progress. Danny dude, figure out git branches already...

On server, ./pull-all.sh reminds me I was going to replace it today.

Enough. Music room time.

Journal : 2024-10-18