Aider / Dockerfile
bk939448's picture
Update Dockerfile
1ee6314 verified
FROM python:3.11-slim
WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
# Install Aider with browser support
RUN pip install --no-cache-dir aider-chat[browser]
# Hugging Face Settings (Critical Fixes)
ENV STREAMLIT_SERVER_PORT=7860
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Hugging Face Proxy Fix (Important for 500 Error)
ENV STREAMLIT_SERVER_ENABLE_CORS=false
ENV STREAMLIT_SERVER_ENABLE_XSRF_PROTECTION=false
ENV STREAMLIT_SERVER_COOKIE_SECRET=badal_secret_key
# Git Init (Required for Aider)
RUN git config --global user.name "Badal" && \
git config --global user.email "badal@example.com" && \
git init .
# Direct Streamlit Launch
# Note: Hum path ko dynamically dhoondh rahe hain taaki error na aaye
CMD ["python", "-m", "streamlit", "run", "/usr/local/lib/python3.11/site-packages/aider/gui.py", "--server.port", "7860", "--server.address", "0.0.0.0", "--", "--model", "gemini/gemini-3.1-flash-lite"]