AnatoliiG commited on
Commit
97d211e
·
1 Parent(s): 5039004

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -13
Dockerfile CHANGED
@@ -1,29 +1,24 @@
1
- # Используем slim-bookworm (Debian 12), так как он стабильнее, чем просто slim
2
  FROM python:3.10-slim-bookworm
3
 
4
- # Настройки окружения
5
- ENV PYTHONUNBUFFERED=1 \
6
- PYTHONDONTWRITEBYTECODE=1 \
7
- HF_HOME=/home/user/cache \
8
- HOME=/home/user \
9
- PATH=/home/user/.local/bin:$PATH
10
-
11
- WORKDIR /app
12
-
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
- libgomp1 \
15
  libopenblas0 \
 
16
  git \
17
  curl \
18
  && rm -rf /var/lib/apt/lists/*
19
 
20
  RUN useradd -m -u 1000 user
21
  USER user
 
 
 
 
 
22
 
23
  RUN pip install --no-cache-dir --upgrade pip
24
 
25
- RUN pip install --no-cache-dir \
26
- https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp310-cp310-linux_x86_64.whl
27
 
28
  COPY --chown=user requirements.txt .
29
  RUN pip install --no-cache-dir -r requirements.txt
 
 
1
  FROM python:3.10-slim-bookworm
2
 
 
 
 
 
 
 
 
 
 
3
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
4
  libopenblas0 \
5
+ libgomp1 \
6
  git \
7
  curl \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
  RUN useradd -m -u 1000 user
11
  USER user
12
+ ENV HOME=/home/user \
13
+ PATH=/home/user/.local/bin:$PATH \
14
+ HF_HOME=/home/user/cache
15
+
16
+ WORKDIR /app
17
 
18
  RUN pip install --no-cache-dir --upgrade pip
19
 
20
+ RUN pip install --no-cache-dir llama-cpp-python \
21
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
22
 
23
  COPY --chown=user requirements.txt .
24
  RUN pip install --no-cache-dir -r requirements.txt