narpatprihar commited on
Commit
e4f5f97
·
verified ·
1 Parent(s): 3b6e9e7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -10
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
- # 1. Base image (Iske bina error aata hai)
2
  FROM python:3.10-slim
3
 
4
- # 2. Build tools install karna (llama-cpp ke liye zaroori hai)
5
- RUN apt-get update && apt-get install -y build-essential python3-dev
 
 
 
6
 
7
- # 3. Memory limit bypass aur flags
8
  ENV CMAKE_ARGS="-DLLAMA_BLAS=OFF -DLLAMA_METAL=OFF"
9
  ENV FORCE_CMAKE=1
10
 
11
- # 4. Library install
12
- RUN pip install --no-cache-dir llama-cpp-python
 
13
 
14
- # 5. Apna baaki code yahan se shuru karo
15
- # COPY . .
16
- # RUN pip install -r requirements.txt
17
- # CMD ["python", "app.py"]
 
 
 
1
+ # 1. Sabse pehle base image (Iske bina error aata hai)
2
  FROM python:3.10-slim
3
 
4
+ # 2. System tools install karna (Kyunki compiling ke liye zaroori hain)
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ python3-dev \
8
+ && rm -rf /var/lib/apt/lists/*
9
 
10
+ # 3. Memory limit bypass aur compilation flags
11
  ENV CMAKE_ARGS="-DLLAMA_BLAS=OFF -DLLAMA_METAL=OFF"
12
  ENV FORCE_CMAKE=1
13
 
14
+ # 4. Library install (Pre-built wheel use karenge taki RAM crash na ho)
15
+ RUN pip install --no-cache-dir llama-cpp-python \
16
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
17
 
18
+ # 5. Apna baaki code yahan setup karo
19
+ WORKDIR /app
20
+ COPY . .
21
+ RUN pip install -r requirements.txt
22
+
23
+ CMD ["python", "app.py"]