-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (26 loc) · 1.04 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (26 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Multi-Agent Code Review System - Docker Image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV PORT=8080
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy and install ONLY production dependencies (no torch!)
COPY requirements-prod.txt .
RUN pip install --no-cache-dir -r requirements-prod.txt
# Pre-download ChromaDB embedding model (if ChromaDB installed) to avoid repeated downloads
# This caches the ~80MB all-MiniLM-L6-v2 model in the Docker image
RUN python -c "from chromadb.utils.embedding_functions import ONNXMiniLM_L6_V2; ONNXMiniLM_L6_V2(); print('ChromaDB model cached')" || echo "ChromaDB not installed, skipping model cache"
# Copy application code
COPY . .
# Create logs directory
RUN mkdir -p logs
# Expose port (Cloud Run uses 8080 by default)
EXPOSE 8080
# Run the application
CMD ["python", "-m", "uvicorn", "src.api.server:app", "--host", "0.0.0.0", "--port", "8080"]