CrazyMonkey0 commited on
Commit
347b2fa
·
1 Parent(s): ef2c272

fix(docker): add --prefer-binary

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -9
Dockerfile CHANGED
@@ -1,29 +1,24 @@
1
  FROM python:3.12-slim
2
-
3
  WORKDIR /app
4
 
5
- # Install system dependencies (including build tools for llama-cpp-python)
6
  RUN apt-get update && apt-get install -y \
7
  wget \
8
  curl \
9
- build-essential \
10
- cmake \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  COPY ./requirements.txt /app/requirements.txt
14
 
15
- # Upgrade pip
16
  RUN pip install --upgrade pip
17
 
18
- # Install llama-cpp-python from pre-built wheel
19
- RUN pip install llama-cpp-python \
20
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
21
 
22
- # Install other requirements
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
  COPY . /app
26
 
27
  EXPOSE 7860
28
 
29
- CMD ["gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120"]
 
1
  FROM python:3.12-slim
 
2
  WORKDIR /app
3
 
4
+ # Tylko curl i wget - BEZ build-essential i cmake!
5
  RUN apt-get update && apt-get install -y \
6
  wget \
7
  curl \
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  COPY ./requirements.txt /app/requirements.txt
11
 
 
12
  RUN pip install --upgrade pip
13
 
14
+ # WYMUŚ pre-built wheel - dodaj --prefer-binary
15
+ RUN pip install llama-cpp-python --prefer-binary \
16
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
17
 
 
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  COPY . /app
21
 
22
  EXPOSE 7860
23
 
24
+ CMD ["gunicorn", "app.main:app", "-k", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "120"]