AnukulChandra/Mini-AI_Assistant
0
1# Use official Python slim image for a lightweight production container2FROM python:3.11-slim3 4# Set working directory inside the container5WORKDIR /app6 7# Copy only requirements first to leverage Docker layer caching8COPY requirements.txt .9 10# Install Python dependencies11# --no-cache-dir keeps the image small by discarding pip's cache12RUN pip install --no-cache-dir -r requirements.txt13 14# Copy the entire project source into the container15COPY . .16 17# Create the vector store directory (persisted FAISS index)18# The .gitignore excludes data/vector_store/ so it must be created explicitly19RUN mkdir -p data/vector_store20 21# Expose port 7860 — required by Hugging Face Spaces,22# also compatible with Render, Railway, and local Docker23EXPOSE 786024 25# Start the FastAPI application with Uvicorn26# Host 0.0.0.0 makes it accessible outside the container27CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]28 