Create Dockerfile
Browse files- Dockerfile +26 -0
Dockerfile
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.10-slim
|
2 |
+
|
3 |
+
# Install system dependencies
|
4 |
+
RUN apt-get update && apt-get install -y \
|
5 |
+
build-essential \
|
6 |
+
cmake \
|
7 |
+
git \
|
8 |
+
&& rm -rf /var/lib/apt/lists/*
|
9 |
+
|
10 |
+
# Clone llama.cpp
|
11 |
+
RUN git clone https://github.com/ggerganov/llama.cpp /app/llama.cpp
|
12 |
+
|
13 |
+
# Build llama.cpp
|
14 |
+
WORKDIR /app/llama.cpp
|
15 |
+
RUN mkdir -p build && cd build && cmake .. && make
|
16 |
+
|
17 |
+
# Set up Python environment
|
18 |
+
WORKDIR /app
|
19 |
+
COPY requirements.txt .
|
20 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
+
|
22 |
+
# Copy your app code
|
23 |
+
COPY . .
|
24 |
+
|
25 |
+
# Set the entrypoint
|
26 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|