WormGPT / Dockerfile
narpatprihar's picture
Update Dockerfile
e4f5f97 verified
raw
history blame contribute delete
705 Bytes
# 1. Sabse pehle base image (Iske bina error aata hai)
FROM python:3.10-slim
# 2. System tools install karna (Kyunki compiling ke liye zaroori hain)
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# 3. Memory limit bypass aur compilation flags
ENV CMAKE_ARGS="-DLLAMA_BLAS=OFF -DLLAMA_METAL=OFF"
ENV FORCE_CMAKE=1
# 4. Library install (Pre-built wheel use karenge taki RAM crash na ho)
RUN pip install --no-cache-dir llama-cpp-python \
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
# 5. Apna baaki code yahan setup karo
WORKDIR /app
COPY . .
RUN pip install -r requirements.txt
CMD ["python", "app.py"]