Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
|
@@ -4,14 +4,20 @@ FROM python:3.9-slim
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /code
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
# Copy requirements
|
| 8 |
COPY ./requirements.txt /code/requirements.txt
|
| 9 |
|
| 10 |
-
#
|
| 11 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
# This downloads the binary instead of compiling it (Saves 20 mins)
|
| 15 |
RUN pip install llama-cpp-python \
|
| 16 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 17 |
|
|
|
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
+
# 1. FIX: Install System Build Tools (Required for llama-cpp-python)
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
build-essential \
|
| 10 |
+
cmake \
|
| 11 |
+
gcc \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
# Copy requirements
|
| 15 |
COPY ./requirements.txt /code/requirements.txt
|
| 16 |
|
| 17 |
+
# 2. Install the easy packages
|
| 18 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 19 |
|
| 20 |
+
# 3. Install AI Engine (Now supports compiling if needed)
|
|
|
|
| 21 |
RUN pip install llama-cpp-python \
|
| 22 |
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 23 |
|