# LangCode Agent Docker Image
FROM python:3.11-slim

# Set working directory
WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements first for better caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Create directory for configuration
RUN mkdir -p /root/.langcode && \
    chmod 700 /root/.langcode

# Expose port for API (future use)
EXPOSE 8000

# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV MODEL_PROVIDER=ollama
ENV MODEL_NAME=gemma2:9b
ENV OLLAMA_BASE_URL=http://host.docker.internal:11434

# Default command
CMD ["python", "langcode.py"]