Skip to content

Commit

Permalink
a new try and removing forked modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mike dupont committed Jan 14, 2025
1 parent e92c167 commit 5ad19ab
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ jobs:
push: true
tags: |
${{ steps.meta.outputs.tags }}
arm64
labels: ${{ steps.meta.outputs.labels }}

- name: Generate artifact attestation
Expand Down
12 changes: 10 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Use a specific Node.js version for better reproducibility
#FROM node:23.3.0-slim AS builder
# note this architecture is listed twice in this file!
FROM arm64v8/node:23-bookworm-slim AS builder
#FROM node:23-bookworm-slim AS builder

FROM arm64v8/node:23-bookworm-slim AS builder
#docker pull
RUN apt-get update
RUN apt-get install -y bash
RUN apt-get install -y curl python3
Expand Down Expand Up @@ -32,7 +34,12 @@ RUN pnpm install \

# Create a new stage for the final image
#FROM node:23.3.0-slim
FROM arm64v8/node:23-bookworm-slim
#FROM node:23-bookworm-slim
FROM h4ckermike/fastembed-js:pr-1 AS fastembed

# dont do anything to this fast embed

FROM arm64v8/node:23-bookworm-slim

# Install runtime dependencies if needed
RUN apt-get update
Expand All @@ -49,6 +56,7 @@ COPY --from=builder /app/pnpm-workspace.yaml ./
COPY --from=builder /app/.npmrc ./
COPY --from=builder /app/turbo.json ./
COPY --from=builder /app/node_modules ./node_modules
COPY --from=fastembed /app/node_modules/fastembed ./node_modules/fastembed
COPY --from=builder /app/agent ./agent
COPY --from=builder /app/packages ./packages
COPY --from=builder /app/scripts ./scripts
Expand Down
1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ packages:
- "packages/plugin-tee"
- "packages/plugin-bootstrap"
- "packages/plugin-twitter"
- "packages/adapter-sqlite"
- "!packages/adapter-pglite/**"
- "!packages/adapter-postgres/**"
- "!packages/adapter-redis/**"
Expand Down
12 changes: 11 additions & 1 deletion scripts/node.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

# review this code
curl -fsSL https://get.pnpm.io/install.sh | env PNPM_VERSION=10.0.0 sh -

. ~/.bashrc
Expand All @@ -13,3 +13,13 @@ nvm use 23

cd /opt/agent
pnpm install

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

. "$HOME/.cargo/env" # For sh/bash/zsh/ash/dash/pdksh

apt install tmux build-essential


echo for fun :
echo apt install emacs-nox
3 changes: 3 additions & 0 deletions set_secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# sets the parameter
aws ssm put-parameter --name "agent_openai_key" --value "${OPENAI_API_KEY}" --type String
4 changes: 2 additions & 2 deletions systemd/agent-docker.service
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ ExecStartPre=-/usr/bin/docker rm %n || echo cannot preremove
#FIXME hardcoded aws id
ExecStartPre=/usr/bin/bash -c 'docker login -u AWS -p $(aws ecr get-login-password --region us-east-2) 767503528736.dkr.ecr.us-east-2.amazonaws.com'

ExecStartPre=/usr/bin/docker pull 767503528736.dkr.ecr.us-east-2.amazonaws.com/agent/eliza:feature-micro
ExecStartPre=/usr/bin/docker pull 767503528736.dkr.ecr.us-east-2.amazonaws.com/agent/eliza:feature-arm64_fastembed

# must run in /app where the docker installed the node modules for now
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-micro
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

# FIXME: update cloudwatch logs
StandardOutput=file:/var/log/agent_systemd.log
Expand Down

0 comments on commit 5ad19ab

Please sign in to comment.