Area51base/cc-chatbot
0
1FROM python:3.11-slim2 3WORKDIR /app4 5# System deps6RUN apt-get update && apt-get install -y --no-install-recommends \7 curl build-essential \8 && rm -rf /var/lib/apt/lists/*9 10# Install Python dependencies11COPY requirements.txt .12RUN pip install --no-cache-dir -r requirements.txt13 14# Install the package15COPY pyproject.toml .16COPY src/ src/17RUN pip install --no-cache-dir -e .18 19# Copy rest of the app20COPY scripts/ scripts/21COPY ui/ ui/22COPY start_render.sh .23 24RUN chmod +x start_render.sh25 26# HF Spaces runs as non-root user 100027RUN useradd -m -u 1000 user && chown -R user /app28USER user29 30# HF Spaces exposes app_port; we use 8501 for Streamlit31ENV PORT=8501 \32 CHROMA_PERSIST_DIR=/tmp/chroma_db \33 APP_ENV=production \34 CORS_ORIGINS='["*"]' \35 CC_API_URL=http://localhost:8000 \36 HOME=/home/user \37 PATH=/home/user/.local/bin:$PATH38 39EXPOSE 850140 41CMD ["bash", "start_render.sh"]42 