Skip to content

Commit 83c1eb0

Browse files
committed
dockerfile
1 parent d0f967c commit 83c1eb0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ __pycache__
1616
README.md
1717
LICENSE
1818
.github
19-
tests/
19+
tests/
20+

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
1010
# the application crashes without emitting any logs due to buffering.
1111
ENV PYTHONUNBUFFERED=1
1212

13+
# Define the program entrypoint file where your agent is started
14+
ARG PROGRAM_MAIN="src/agent.py"
15+
ENV PROGRAM_MAIN=${PROGRAM_MAIN}
16+
1317
# Create a non-privileged user that the app will run under.
1418
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
1519
ARG UID=10001
@@ -61,7 +65,7 @@ RUN uv sync --locked
6165
# Pre-download any ML models or files the agent needs
6266
# This ensures the container is ready to run immediately without downloading
6367
# dependencies at runtime, which improves startup time and reliability
64-
RUN uv run src/agent.py download-files
68+
RUN uv run "$PROGRAM_MAIN" download-files
6569

6670
# Expose the healthcheck port
6771
# This allows Docker and orchestration systems to check if the container is healthy
@@ -70,4 +74,4 @@ EXPOSE 8081
7074
# Run the application using UV
7175
# UV will activate the virtual environment and run the agent
7276
# The "start" command tells the worker to connect to LiveKit and begin waiting for jobs
73-
CMD ["uv", "run", "src/agent.py", "start"]
77+
CMD ["uv", "run", "$PROGRAM_MAIN", "start"]

0 commit comments

Comments
 (0)