CoolFace
Apppublic

DavidL72Code/UMB_Sustainable_Chatbot

sourceHugging Faceupdated 5d agoView on Hugging Face
0likes
Dockerfile44 linesDownload Raw Back to root
1# Hugging Face Space (Docker SDK) — Flask backend for the SSL Chatbot2FROM python:3.11-slim3 4ENV PYTHONDONTWRITEBYTECODE=1 \5    PYTHONUNBUFFERED=1 \6    PIP_NO_CACHE_DIR=1 \7    PIP_DISABLE_PIP_VERSION_CHECK=1 \8    HF_HOME=/app/.cache/huggingface \9    SENTENCE_TRANSFORMERS_HOME=/app/.cache/sentence-transformers \10    CHATBOT_HOST=0.0.0.0 \11    PORT=786012 13WORKDIR /app14 15# System deps needed by chromadb (sqlite, build tooling for some wheels)16RUN apt-get update && apt-get install -y --no-install-recommends \17        build-essential \18        git \19        curl \20    && rm -rf /var/lib/apt/lists/*21 22# Install Python deps first for layer caching23COPY requirements.txt ./24RUN pip install --upgrade pip && pip install -r requirements.txt25 26# Copy the app27# Every root-level module, not a hand-maintained list. Naming them one by one28# already shipped an image without supabase_store.py once, and splitting29# Chatbot.py into modules makes that mistake easy to repeat.30COPY *.py ./31COPY verified_question_bank.json ./32 33# API only — no templates/ or static/. Vercel serves the UI from frontend/.34 35# Include the prebuilt vector store so startup can skip first-run indexing36COPY chroma_db/ ./chroma_db/37 38# HF Spaces sometimes runs as non-root; make the cache + chroma dirs writable39RUN mkdir -p /app/chroma_db /app/.cache && chmod -R 777 /app/chroma_db /app/.cache40 41EXPOSE 786042 43CMD ["python", "Chatbot.py"]44