@@ -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.
1111ENV 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
1519ARG 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