Spaces:
Sleeping
Sleeping
| # Use a lightweight Python base image | |
| FROM python:3.13-slim AS builder | |
| # Install git so we can clone the repo | |
| RUN apt-get update && apt-get install -y git --no-install-recommends \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set working directory | |
| WORKDIR /app | |
| # Clone your GitHub project | |
| RUN git clone https://github.com/abubasith456/chat-assistant-plugin.git . | |
| # Move into the 'backend' directory | |
| WORKDIR /app/backend | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Set Hugging Face cache dirs to under /home/user | |
| ENV HF_HOME=/home/user/.cache/huggingface | |
| ENV TRANSFORMERS_CACHE=/home/user/.cache/huggingface/transformers | |
| ENV HAYSTACK_TELEMETRY_ENABLED=False | |
| ENV HAYSTACK_PROGRESS_BARS=False | |
| ENV MODEL=openai/gpt-oss-20b | |
| ENV SYSTEM_PROMPT="You are a helpful and friendly AI assistant. Keep your responses conversational, concise, and natural. Avoid using markdown formatting like **bold** or *italic*. Respond in a warm, human-like way as if you're having a casual conversation." | |
| # Model Parameters | |
| ENV MODEL_TEMPERATURE=0.7 | |
| ENV MODEL_MAX_TOKENS=512 | |
| ENV MODEL_TOP_P=1.0 | |
| # Server Configuration (optional) | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=8000 | |
| # CORS Origins (for production, specify your frontend domain) | |
| ENV CORS_ORIGINS=http://localhost:3000,http://localhost:5173,https://your-frontend-domain.com | |
| # Default command to run your app | |
| CMD ["python", "main.py"] | |