dieumercimvemba commited on
Commit
d3a1f15
·
verified ·
1 Parent(s): a207d07

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # dépendances système
8
+ RUN apt update && apt install -y \
9
+ git \
10
+ cmake \
11
+ build-essential \
12
+ wget \
13
+ curl \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+
17
+ # Cloner llama.cpp
18
+ RUN git clone https://github.com/ggerganov/llama.cpp.git
19
+
20
+
21
+ WORKDIR /app/llama.cpp
22
+
23
+ # Compiler llama.cpp
24
+ RUN cmake -B build \
25
+ -DGGML_NATIVE=OFF \
26
+ && cmake --build build --config Release
27
+
28
+
29
+ WORKDIR /app
30
+
31
+
32
+ # Python deps
33
+ COPY requirements.txt .
34
+
35
+ RUN pip install --no-cache-dir -r requirements.txt
36
+
37
+
38
+ COPY app.py .
39
+
40
+
41
+ # port HF
42
+ EXPOSE 7860
43
+
44
+
45
+ CMD [
46
+ "python",
47
+ "app.py"
48
+ ]