yashsecdev commited on
Commit
567f582
·
1 Parent(s): 15c441b

Fix: Force manylinux wheel-2

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -26,26 +26,24 @@ RUN mkdir -p /app/models && chmod 777 /app/models
26
  # Copy Python requirements first for caching
27
  COPY requirements.txt .
28
 
29
- # Install dependencies
30
- # Install dependencies
31
  RUN pip install --no-cache-dir --upgrade pip && \
32
  pip install --no-cache-dir -r requirements.txt
33
 
34
- # Install llama-cpp-python using specific manylinux wheel to avoid musl/glibc mismatch
35
- RUN pip install https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
36
 
37
  # Copy the rest of the application
38
  COPY . .
39
 
40
- # Install the package itself to ensure all dependencies (e.g. cryptography) from pyproject.toml are installed
41
  RUN pip install .
42
 
43
- # Copy built frontend assets from Stage 1
44
  COPY --from=build-frontend /app/web_client/dist /app/web_client/dist
45
 
46
- # Expose the port (Hugging Face expects 7860 by default, but we can set PORT env)
47
  ENV PORT=7860
48
  EXPOSE 7860
49
 
50
- # Command to run the application
51
  CMD ["python", "server.py"]
 
26
  # Copy Python requirements first for caching
27
  COPY requirements.txt .
28
 
29
+ # Install dependencies (pip + Python deps)
 
30
  RUN pip install --no-cache-dir --upgrade pip && \
31
  pip install --no-cache-dir -r requirements.txt
32
 
33
+ # ⬇️ FIX: install llama-cpp-python correctly (compiles from source)
34
+ RUN CMAKE_ARGS="-DLLAMA_CUBLAS=off" pip install --no-cache-dir llama-cpp-python==0.2.90
35
 
36
  # Copy the rest of the application
37
  COPY . .
38
 
39
+ # Install your backend package (pyproject.toml)
40
  RUN pip install .
41
 
42
+ # Copy built frontend assets
43
  COPY --from=build-frontend /app/web_client/dist /app/web_client/dist
44
 
45
+ # Hugging Face defaults
46
  ENV PORT=7860
47
  EXPOSE 7860
48
 
 
49
  CMD ["python", "server.py"]