Skip to content

Commit d00f3bd

Browse files
author
mike dupont
committed
bugfix : name mismatch
work in progress
1 parent 1ee8ef2 commit d00f3bd

File tree

4 files changed

+109
-30
lines changed

4 files changed

+109
-30
lines changed

README.md

+65
Original file line numberDiff line numberDiff line change
@@ -330,3 +330,68 @@ pnpm install --include=optional sharp
330330

331331
[![Star History Chart](https://api.star-history.com/svg?repos=elizaos/eliza&type=Date)](https://star-history.com/#elizaos/eliza&Date)
332332

333+
334+
335+
336+
## Notes
337+
338+
```
339+
export AWS_REGION=us-east-1
340+
export AWS_DEFAULT_REGION=us-east-1
341+
aws ssm start-session --target i-0fe1eb04620fa49b6
342+
sudo su -
343+
cd /opt/agent/
344+
git branch
345+
* feature/systemd-parameters
346+
docker ps
347+
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
348+
apt install asciinema
349+
asciinema rec debug1.cast
350+
```
351+
352+
cat /var/lib/cloud/instances/i-0fe1eb04620fa49b6/user-data.txt
353+
if [ ! -d "/opt/agent/" ]; then
354+
git clone https://github.com/meta-introspector/cloud-deployment-eliza/ "/opt/agent/"
355+
fi
356+
cd "/opt/agent/" || exit 1
357+
git stash
358+
git fetch --all # get the latest version
359+
git checkout --track --force "origin/feature/systemd-parameters"
360+
bash -x /opt/agent/rundocker.sh
361+
362+
Get our new version:
363+
```
364+
git pull
365+
```
366+
367+
Better error messages:
368+
Could not find tine_agent_agent_image
369+
Could not find tine_agent_tokenizer_image
370+
Could not find tine_agent_twitter_email
371+
Could not find tine_agent_twitter_username
372+
Could not find tine_agent_groq_key
373+
Could not find tine_agent_twitter_password
374+
375+
Now lets put this into aws and overwrite the old key
376+
```
377+
export AGENT_IMAGE=h4ckermike/arm64-tokenizers:feature-arm64
378+
export TOKENIZER_IMAGE=h4ckermike/elizaos-eliza:feature-arm64_fastembed
379+
…. All the variables mentioned.
380+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_password" --value "${TWITTER_PASSWORD}" --type String
381+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_email" --value "${TWITTER_EMAIL}" --type String
382+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_username" --value "${TWITTER_USERNAME}" --type String
383+
aws ssm put-parameter --name "tine_agent_openai_key" --value "${OPENAI_API_KEY}" --type String
384+
aws ssm put-parameter --name "tine_agent_openai_endpoint" --value "${OPENAI_API_BASE}" --type String
385+
aws ssm put-parameter --name "tine_agent_openai_model" --value "${LLMMODEL}" --type String aws ssm put-parameter --name "tine_agent_groq_key" --value "${GROQ_API_KEY}" --type String
386+
```
387+
This is in the set_secrets.sh
388+
389+
Using docker images from docker hub will cause docker to block you eventually
390+
For bandwidth. You will want to host the docker images in your ECR repository or somewhere you own for stability.
391+
392+
bash ./get_secrets.sh
393+
cat /var/run/agent/secrets/env
394+
395+
aws ssm start-session --target i-0fe1eb04620fa49b6 --region us-east-1
396+
397+
https://github.com/jmikedupont2/ai-agent-terraform/tree/feature/codebuild

demo.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,6 @@ aws ssm start-session --target i-06a744b2cf12e2356 --document-name AWS-StartPort
3232
3333
```
3434

35-
# now lets connect the agent on what appears to be local host 9031
36-
```
37-
cd ~/eliza-starter/
38-
export SERVER_NAME=localhost:9301
39-
nvm use 23
40-
pnpm start
41-
```
42-
43-
```
44-
ssh ubuntu@localhost -p 2222
45-
sudo su -
46-
cd /opt/agent
47-
48-
asciinema rec server.txt
49-
tail -f strace.log | grep -i TINE
50-
asciinema upload server.txt
51-
```
52-
53-
Record cinema
54-
```
55-
asciinema rec server.ac
56-
```
57-
58-
```
59-
aws ssm start-session --target i-06a744b2cf12e2356
60-
```
61-
6235
# next configure our access to llm api
6336

6437
We will use the free tier LLM Model
@@ -713,3 +686,30 @@ set | grep TWITTER
713686
```
714687

715688

689+
# now lets connect the agent on what appears to be local host 9031
690+
```
691+
cd ~/eliza-starter/
692+
export SERVER_NAME=localhost:9301
693+
nvm use 23
694+
pnpm start
695+
```
696+
697+
```
698+
ssh ubuntu@localhost -p 2222
699+
sudo su -
700+
cd /opt/agent
701+
702+
asciinema rec server.txt
703+
tail -f strace.log | grep -i TINE
704+
asciinema upload server.txt
705+
```
706+
707+
Record cinema
708+
```
709+
asciinema rec server.ac
710+
```
711+
712+
```
713+
aws ssm start-session --target i-06a744b2cf12e2356
714+
```
715+

set_secrets.sh

+15-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
#set +x # turn off logging
2+
export AGENT_IMAGE=h4ckermike/arm64-tokenizers:feature-arm64
3+
export TOKENIZER_IMAGE=h4ckermike/elizaos-eliza:feature-arm64_fastembed
14

25
# sets the parameter
3-
aws ssm put-parameter --name "agent_openai_key" --value "${OPENAI_API_KEY}" --type String
6+
#aws ssm put-parameter --name "agent_openai_key" --value "${OPENAI_API_KEY}" --type String
7+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_password" --value "${TWITTER_PASSWORD}" --type String
8+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_email" --value "${TWITTER_EMAIL}" --type String
9+
aws ssm put-parameter --overwrite --name "tine_agent_twitter_username" --value "${TWITTER_USERNAME}" --type String
10+
#aws ssm put-parameter --name "tine_agent_openai_key" --value "${OPENAI_API_KEY}" --type String
11+
#aws ssm put-parameter --name "tine_agent_openai_endpoint" --value "${OPENAI_API_BASE}" --type String
12+
#aws ssm put-parameter --name "tine_agent_openai_model" --value "${LLMMODEL}" --type String
13+
aws ssm put-parameter --name "tine_agent_groq_key" --value "${GROQ_API_KEY}" --type String
14+
15+
aws ssm put-parameter --name "tine_agent_agent_image" --value "${AGENT_IMAGE}" --type String
16+
aws ssm put-parameter --name "tine_agent_tokenizer_image" --value "${TOKENIZER_IMAGE}" --type String
17+

systemd/agent-docker.service

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ ExecStartPre=-/usr/bin/docker exec %n stop || echo cannot prestop
1919
ExecStartPre=-/usr/bin/docker rm %n || echo cannot preremove
2020

2121
ExecStartPre=/usr/bin/docker pull {AGENT_IMAGE}
22-
ExecStartPre=/usr/bin/docker pull {TOKENIZERS_IMAGE}
23-
ExecStartPre=docker run -v tokenizer:/node_modules/tokenizers/ {TOKENIZERS_IMAGE}
22+
ExecStartPre=/usr/bin/docker pull {TOKENIZER_IMAGE}
23+
ExecStartPre=docker run -v tokenizer:/node_modules/tokenizers/ {TOKENIZER_IMAGE}
2424

2525
#ExecStart=/usr/bin/docker run -p 3000:3000 --mount type=bind,source=/opt/agent,target=/opt/agent --env-file /var/run/agent/secrets/env --rm --name %n 767503528736.dkr.ecr.us-east-2.amazonaws.com/agent/eliza:feature-arm64_fastembed
2626
ExecStart=/usr/bin/docker run -d -p 3000:3000 -v tokenizer:/app/node_modules/@anush008/tokenizers/ -v tokenizer:/app/node_modules/fastembed/node_modules/.pnpm/@anush008+tokenizers@https+++codeload.github.com+meta-introspector+arm64-tokenizers+tar.gz+98_s2457qj3pe4ojcbckddasgzfvu/node_modules/@anush008/ --mount type=bind,source=/opt/agent,target=/opt/agent --mount type=bind,source=/opt/agent/characters/,target=/app/agent/characters/ --mount type=bind,source=/opt/characters/eliza.character.json,target=/agent/characters/eliza.character.json --env-file /var/run/agent/secrets/env --rm --name "agent-docker.service" --entrypoint /opt/agent/docker-entrypoint-strace2.sh {AGENT_IMAGE}

0 commit comments

Comments
 (0)