Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -10
Dockerfile
CHANGED
|
@@ -1,21 +1,21 @@
|
|
| 1 |
-
# Use a
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
-
|
| 7 |
python3-dev \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
# Install the
|
| 11 |
-
RUN pip install --no-cache-dir
|
| 12 |
-
|
| 13 |
-
requests \
|
| 14 |
-
llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 15 |
|
| 16 |
-
# Set
|
| 17 |
WORKDIR /app
|
|
|
|
|
|
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
#
|
| 21 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
# Use a standard Python image
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Install system tools needed for the engine
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential \
|
| 7 |
python3-dev \
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
+
# Install the engine using a STABLE version that doesn't crash
|
| 11 |
+
RUN pip install --no-cache-dir flask requests
|
| 12 |
+
RUN pip install --no-cache-dir llama-cpp-python==0.2.90
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
# Set the working directory
|
| 15 |
WORKDIR /app
|
| 16 |
+
|
| 17 |
+
# Copy all your files (app.py, model, etc.) into the container
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
+
# Start Maira
|
| 21 |
CMD ["python", "app.py"]
|