Update Dockerfile
Browse files- Dockerfile +43 -41
Dockerfile
CHANGED
@@ -1,42 +1,44 @@
|
|
1 |
-
FROM ubuntu:22.04
|
2 |
-
|
3 |
-
# Install system dependencies
|
4 |
-
RUN apt-get update && \
|
5 |
-
apt-get install -y \
|
6 |
-
build-essential \
|
7 |
-
libssl-dev \
|
8 |
-
zlib1g-dev \
|
9 |
-
libboost-system-dev \
|
10 |
-
libboost-filesystem-dev \
|
11 |
-
cmake \
|
12 |
-
git \
|
13 |
-
python3-pip \
|
14 |
-
curl \
|
15 |
-
wget && \
|
16 |
-
rm -rf /var/lib/apt/lists/*
|
17 |
-
|
18 |
-
# Install Python dependencies
|
19 |
-
RUN pip3 install huggingface-hub openai gradio
|
20 |
-
|
21 |
-
# Build llama.cpp
|
22 |
-
RUN git clone https://github.com/ggerganov/llama.cpp && \
|
23 |
-
cd llama.cpp && \
|
24 |
-
mkdir build && \
|
25 |
-
cd build && \
|
26 |
-
cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release && \
|
27 |
-
cmake --build . --config Release --target llama-server -j $(nproc)
|
28 |
-
|
29 |
-
# Download model
|
30 |
-
RUN mkdir -p /models && \
|
31 |
-
wget -O /models/model.q8_0.gguf https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q8_0.gguf
|
32 |
-
|
33 |
-
# Copy app and startup script
|
34 |
-
COPY app.py /app.py
|
35 |
-
COPY start.sh /start.sh
|
36 |
-
RUN chmod +x /start.sh
|
37 |
-
|
38 |
-
# Expose ports
|
39 |
-
EXPOSE 7860 8080
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
CMD ["/start.sh"]
|
|
|
1 |
+
FROM ubuntu:22.04
|
2 |
+
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && \
|
5 |
+
apt-get install -y \
|
6 |
+
build-essential \
|
7 |
+
libssl-dev \
|
8 |
+
zlib1g-dev \
|
9 |
+
libboost-system-dev \
|
10 |
+
libboost-filesystem-dev \
|
11 |
+
cmake \
|
12 |
+
git \
|
13 |
+
python3-pip \
|
14 |
+
curl \
|
15 |
+
wget && \
|
16 |
+
rm -rf /var/lib/apt/lists/*
|
17 |
+
|
18 |
+
# Install Python dependencies
|
19 |
+
RUN pip3 install huggingface-hub openai gradio
|
20 |
+
|
21 |
+
# Build llama.cpp
|
22 |
+
RUN git clone https://github.com/ggerganov/llama.cpp && \
|
23 |
+
cd llama.cpp && \
|
24 |
+
mkdir build && \
|
25 |
+
cd build && \
|
26 |
+
cmake .. -DLLAMA_BUILD_SERVER=ON -DLLAMA_BUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release && \
|
27 |
+
cmake --build . --config Release --target llama-server -j $(nproc)
|
28 |
+
|
29 |
+
# Download model
|
30 |
+
RUN mkdir -p /models && \
|
31 |
+
wget -O /models/model.q8_0.gguf https://huggingface.co/unsloth/DeepSeek-R1-Distill-Qwen-1.5B-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-1.5B-Q8_0.gguf
|
32 |
+
|
33 |
+
# Copy app and startup script
|
34 |
+
COPY app.py /app.py
|
35 |
+
COPY start.sh /start.sh
|
36 |
+
RUN chmod +x /start.sh
|
37 |
+
|
38 |
+
# Expose ports
|
39 |
+
EXPOSE 7860 8080
|
40 |
+
|
41 |
+
RUN ls
|
42 |
+
|
43 |
+
# Start services
|
44 |
CMD ["/start.sh"]
|