Spaces:
Sleeping
Sleeping
| # FROM python:3.11-slim | |
| # # System dependencies - minimum tu | |
| # RUN apt-get update && apt-get install -y \ | |
| # gcc \ | |
| # g++ \ | |
| # && rm -rf /var/lib/apt/lists/* | |
| # WORKDIR /app | |
| # # Install llama-cpp-python KWANZA kwa pre-built wheel (haraka sana, no compile) | |
| # RUN pip install --no-cache-dir \ | |
| # llama-cpp-python==0.2.90 \ | |
| # --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \ | |
| # --prefer-binary | |
| # # Install dependencies zingine | |
| # COPY requirements.txt . | |
| # RUN pip install --no-cache-dir -r requirements.txt | |
| # # Copy code | |
| # COPY app/ ./app/ | |
| # # Tengeneza folders | |
| # RUN mkdir -p ./data ./models | |
| # EXPOSE 7860 | |
| # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] | |
| FROM python:3.11-slim | |
| # System dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| g++ \ | |
| cmake \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install llama-cpp-python kutoka PyPI moja kwa moja (glibc compatible) | |
| # --prefer-binary inachukua pre-built wheel ya glibc, si musl | |
| RUN pip install --no-cache-dir \ | |
| "llama-cpp-python==0.2.90" \ | |
| --prefer-binary \ | |
| --no-deps | |
| # Install dependencies zingine | |
| RUN pip install --no-cache-dir \ | |
| diskcache \ | |
| numpy | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy code | |
| COPY app/ ./app/ | |
| # Tengeneza folders | |
| RUN mkdir -p ./data ./models | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |