dockerfile
This commit is contained in:
+2
-1
@@ -16,4 +16,5 @@ __pycache__
|
|||||||
README.md
|
README.md
|
||||||
LICENSE
|
LICENSE
|
||||||
.github
|
.github
|
||||||
tests/
|
tests/
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -10,6 +10,10 @@ FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
|
|||||||
# the application crashes without emitting any logs due to buffering.
|
# the application crashes without emitting any logs due to buffering.
|
||||||
ENV PYTHONUNBUFFERED=1
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
# Define the program entrypoint file where your agent is started
|
||||||
|
ARG PROGRAM_MAIN="src/agent.py"
|
||||||
|
ENV PROGRAM_MAIN=${PROGRAM_MAIN}
|
||||||
|
|
||||||
# Create a non-privileged user that the app will run under.
|
# Create a non-privileged user that the app will run under.
|
||||||
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
|
# See https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#user
|
||||||
ARG UID=10001
|
ARG UID=10001
|
||||||
@@ -61,7 +65,7 @@ RUN uv sync --locked
|
|||||||
# Pre-download any ML models or files the agent needs
|
# Pre-download any ML models or files the agent needs
|
||||||
# This ensures the container is ready to run immediately without downloading
|
# This ensures the container is ready to run immediately without downloading
|
||||||
# dependencies at runtime, which improves startup time and reliability
|
# dependencies at runtime, which improves startup time and reliability
|
||||||
RUN uv run src/agent.py download-files
|
RUN uv run "$PROGRAM_MAIN" download-files
|
||||||
|
|
||||||
# Expose the healthcheck port
|
# Expose the healthcheck port
|
||||||
# This allows Docker and orchestration systems to check if the container is healthy
|
# This allows Docker and orchestration systems to check if the container is healthy
|
||||||
@@ -70,4 +74,4 @@ EXPOSE 8081
|
|||||||
# Run the application using UV
|
# Run the application using UV
|
||||||
# UV will activate the virtual environment and run the agent
|
# UV will activate the virtual environment and run the agent
|
||||||
# The "start" command tells the worker to connect to LiveKit and begin waiting for jobs
|
# The "start" command tells the worker to connect to LiveKit and begin waiting for jobs
|
||||||
CMD ["uv", "run", "src/agent.py", "start"]
|
CMD ["uv", "run", "$PROGRAM_MAIN", "start"]
|
||||||
|
|||||||
Reference in New Issue
Block a user