Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +10 -6
Dockerfile
CHANGED
|
@@ -1,18 +1,22 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
-
# Install
|
|
|
|
|
|
|
| 6 |
RUN pip install --no-cache-dir \
|
| 7 |
llama-cpp-python \
|
| 8 |
-
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
|
|
|
| 9 |
|
| 10 |
-
# Install other dependencies
|
| 11 |
RUN pip install --no-cache-dir \
|
| 12 |
huggingface_hub \
|
| 13 |
gradio
|
| 14 |
|
| 15 |
-
#
|
| 16 |
WORKDIR /app
|
| 17 |
COPY . .
|
| 18 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
+
FROM python:3.9
|
| 2 |
|
| 3 |
+
# 2. Upgrade pip to ensure it can see the wheels
|
| 4 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 5 |
|
| 6 |
+
# 3. Install llama-cpp-python
|
| 7 |
+
# We use '--prefer-binary' to FORCE it to download the wheel
|
| 8 |
+
# We use the CPU-specific URL
|
| 9 |
RUN pip install --no-cache-dir \
|
| 10 |
llama-cpp-python \
|
| 11 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
|
| 12 |
+
--prefer-binary
|
| 13 |
|
| 14 |
+
# 4. Install other dependencies
|
| 15 |
RUN pip install --no-cache-dir \
|
| 16 |
huggingface_hub \
|
| 17 |
gradio
|
| 18 |
|
| 19 |
+
# 5. Set up the app
|
| 20 |
WORKDIR /app
|
| 21 |
COPY . .
|
| 22 |
CMD ["python", "app.py"]
|