content: FROM python:3.11-slim
  
  # Set working directory
  WORKDIR /app
  
  # Install system dependencies
  RUN apt-get update && apt-get install -y \
      gcc \
      g++ \
      && rm -rf /var/lib/apt/lists/*
  
  # Install Poetry
  RUN pip install poetry
  
  # Copy poetry files
  COPY backend/pyproject.toml backend/poetry.lock* ./
  
  # Configure poetry to not create virtual environment
  RUN poetry config virtualenvs.create false
  
  # Install dependencies
  RUN poetry install --no-dev --no-interaction --no-ansi
  
  # Copy application code
  COPY backend/app ./app
  
  # Create necessary directories
  RUN mkdir -p uploads outputs temp models
  
  # Expose port
  EXPOSE 8000
  
  # Set environment variables
  ENV PYTHONPATH=/app
  ENV PYTHONUNBUFFERED=1
  
  # Run the application
  CMD ["poetry", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
  