Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
# Install dependencies
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
git \
|
6 |
+
build-essential \
|
7 |
+
cmake \
|
8 |
+
curl \
|
9 |
+
python3-pip \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Install llama.cpp
|
13 |
+
RUN cd / && git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make
|
14 |
+
|
15 |
+
# Setup model directory
|
16 |
+
WORKDIR /models
|
17 |
+
|
18 |
+
# Python dependencies
|
19 |
+
COPY requirements.txt .
|
20 |
+
RUN pip install -r requirements.txt
|
21 |
+
|
22 |
+
# Copy app files
|
23 |
+
COPY app.py .
|
24 |
+
|
25 |
+
# Download model and start server
|
26 |
+
CMD ["bash", "-c", "cd /models && python3 app.py"]
|