Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # 1. System dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| build-essential \ | |
| cmake \ | |
| wget \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Setup User 1000 (Required for HF Spaces) | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # 3. Install requirements | |
| # We install llama-cpp-python first to utilize caching | |
| RUN pip install --no-cache-dir \ | |
| llama-cpp-python==0.2.90 \ | |
| huggingface_hub \ | |
| gradio \ | |
| python-dotenv | |
| # 4. Copy application files | |
| COPY --chown=user . . | |
| # 5. Start the app | |
| CMD ["python", "app.py"] |