Team Ai
Apppublic

abhishekai00/source-code-analyzer

sourceHugging Facemitupdated 5mo agoView on Hugging Face
0likes
Dockerfile36 linesDownload Raw Back to root
1# ── Base image ───────────────────────────────────────────────2FROM python:3.10-slim3 4# ── System dependencies ──────────────────────────────────────5# git          → required by GitPython to clone repos at runtime6# build-essential → gcc/g++ compiler needed to build chroma-hnswlib (C++ extension)7RUN apt-get update && \8    apt-get install -y --no-install-recommends git build-essential && \9    rm -rf /var/lib/apt/lists/*10 11# ── Working directory ────────────────────────────────────────12WORKDIR /app13 14# ── Python dependencies ──────────────────────────────────────15COPY requirements.txt .16RUN pip install --no-cache-dir -r requirements.txt17 18# ── Copy project files ───────────────────────────────────────19COPY . .20 21# ── Runtime directories ──────────────────────────────────────22# repo/ → where GitHub repos will be cloned23# db/   → where ChromaDB stores vectors24RUN mkdir -p repo db25 26# ── Hugging Face Spaces exposes port 7860 ────────────────────27EXPOSE 786028 29# ── Start the app with gunicorn ──────────────────────────────30# timeout=300 because store_index.py can take a few minutes31# workers=1   because ChromaDB / shared state doesn't work with multiple workers32CMD ["gunicorn", "app:app", \33     "--bind", "0.0.0.0:7860", \34     "--timeout", "300", \35     "--workers", "1"]36