Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +20 -1
Dockerfile
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
|
|
| 1 |
FROM ghcr.io/ggml-org/llama.cpp:full
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Start with the official full image
|
| 2 |
FROM ghcr.io/ggml-org/llama.cpp:full
|
| 3 |
|
| 4 |
+
# Set up the working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# 1. Install Python and Pip (The base image is often minimal Ubuntu)
|
| 8 |
+
RUN apt-get update && \
|
| 9 |
+
apt-get install -y python3 python3-pip git && \
|
| 10 |
+
rm -rf /var/lib/apt/lists/*
|
| 11 |
+
|
| 12 |
+
# 2. Copy your requirements and install Python libraries
|
| 13 |
+
COPY requirements.txt .
|
| 14 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 15 |
+
|
| 16 |
+
# 3. Copy your application code
|
| 17 |
+
COPY . .
|
| 18 |
+
|
| 19 |
+
# 4. Create a folder for models to live in
|
| 20 |
+
RUN mkdir -p /app/models
|
| 21 |
+
|
| 22 |
+
# 5. IMPORTANT: Override the base image's entrypoint.
|
| 23 |
+
# The base image defaults to running 'llama-server', but we want to run 'app.py'
|
| 24 |
+
ENTRYPOINT ["python3", "app.py"]
|