AnatoliiG commited on
Commit
9a6571c
·
1 Parent(s): 9ef242b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -10
Dockerfile CHANGED
@@ -1,26 +1,31 @@
1
  FROM python:3.10-slim
2
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y \
6
- wget \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
- RUN wget https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp310-cp310-linux_x86_64.whl -O llama_cpp_python.whl
 
10
 
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- RUN pip install llama_cpp_python.whl
15
-
16
- RUN rm llama_cpp_python.whl
17
-
18
  RUN useradd -m -u 1000 user
19
- USER user
20
  ENV HOME=/home/user \
21
- PATH=/home/user/.local/bin:$PATH
 
22
 
 
23
  WORKDIR /app
 
 
24
  COPY --chown=user app.py .
25
 
26
  EXPOSE 7860
 
1
  FROM python:3.10-slim
2
 
3
+ RUN apt-get update && apt-get install -y --no-install-recommends \
4
+ libgomp1 \
5
+ libopenblas-base \
6
+ git \
7
+ curl \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
  WORKDIR /app
11
 
12
+ RUN pip install --upgrade pip
 
 
13
 
14
+ RUN pip install --no-cache-dir \
15
+ https://github.com/abetlen/llama-cpp-python/releases/download/v0.2.90/llama_cpp_python-0.2.90-cp310-cp310-linux_x86_64.whl
16
 
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
 
 
 
20
  RUN useradd -m -u 1000 user
 
21
  ENV HOME=/home/user \
22
+ PATH=/home/user/.local/bin:$PATH \
23
+ HF_HOME=/home/user/cache
24
 
25
+ USER user
26
  WORKDIR /app
27
+
28
+ # 6. Копируем код
29
  COPY --chown=user app.py .
30
 
31
  EXPOSE 7860