Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ COPY package.json pnpm-lock.yaml ./
# --frozen-lockfile ensures we use exact versions from pnpm-lock.yaml for reproducible builds
RUN pnpm install --frozen-lockfile

# Pre-download any ML models or files the agent needs
# This runs before COPY . . so the download layer is cached across code-only changes.
# The standalone CLI discovers installed @livekit/agents-plugin-* packages without
# loading your agent code.
RUN pnpm download-files

# Copy all remaining application files into the container
# This includes source code, configuration files, and dependency specifications
# (Excludes files specified in .dockerignore)
Expand All @@ -42,12 +48,6 @@ COPY . .
# Your package.json must contain a "build" script, such as `"build": "tsc"`
RUN pnpm build

# Pre-download any ML models or files the agent needs
# This ensures the container is ready to run immediately without downloading
# dependencies at runtime, which improves startup time and reliability
# Your package.json must contain a "download-files" script, such as `"download-files": "pnpm run build && node dist/agent.js download-files"`
RUN pnpm download-files

# Remove dev dependencies for a leaner production image
RUN pnpm prune --prod

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"test": "vitest --run",
"test:watch": "vitest",
"dev": "pnpm run build && node dist/main.js dev",
"download-files": "pnpm run build && npx livekit-agents download-files",
"download-files": "npx livekit-agents download-files",
"start": "node dist/main.js start"
},
"engines": {
Expand Down
Loading