Skip to content

Commit 9b1fae9

Browse files
committed
Additional changes
1 parent 3e9be1b commit 9b1fae9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+997
-8
lines changed

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Configuration for local Ollama model usage
2+
OLLAMA_BASE_URL=http://localhost:11434
3+
OLLAMA_API_KEY=ollama
4+
5+
# Disable Google GenAI/Vertex AI for local model usage
6+
GOOGLE_GENAI_USE_VERTEXAI=FALSE

Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Use Python 3.13 base image
2+
FROM python:3.13-slim
3+
4+
# Create non-root user for OpenShift compatibility
5+
RUN groupadd -r appuser -g 1001 && \
6+
useradd -r -g appuser -u 1001 -m -d /app appuser
7+
8+
# Set working directory
9+
WORKDIR /app
10+
11+
# Install system dependencies
12+
RUN apt-get update && apt-get install -y \
13+
curl \
14+
&& rm -rf /var/lib/apt/lists/*
15+
16+
# Copy requirements first for better caching
17+
COPY requirements.txt .
18+
19+
# Install Python dependencies
20+
RUN pip install --no-cache-dir -r requirements.txt
21+
22+
# Copy the entire application
23+
COPY . .
24+
25+
# Change ownership to appuser
26+
RUN chown -R appuser:appuser /app
27+
28+
# Switch to non-root user
29+
USER 1001
30+
31+
# Set environment variables
32+
ENV PYTHONPATH=/app
33+
ENV OLLAMA_API_BASE=http://ollama-service:11434
34+
35+
# Expose port for ADK web server
36+
EXPOSE 8000
37+
38+
# Health check
39+
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
40+
CMD curl -f http://localhost:8000/ || exit 1
41+
42+
# Run the agent
43+
CMD ["adk", "web", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)