Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
-
#
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
# Install
|
| 7 |
RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
-
# 1. Install PREBUILT llama-cpp-python
|
| 10 |
-
# This
|
| 11 |
RUN pip install --no-cache-dir \
|
| 12 |
-
https://
|
| 13 |
|
| 14 |
# 2. Install web dependencies
|
| 15 |
RUN pip install --no-cache-dir fastapi uvicorn[standard] requests
|
| 16 |
|
| 17 |
-
# 3. Setup models
|
| 18 |
RUN mkdir -p ./models
|
| 19 |
RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
|
| 20 |
https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf
|
|
|
|
| 1 |
+
# We switch to 3.10 to match the most stable community prebuilt wheels
|
| 2 |
+
FROM python:3.10-slim
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Install system essentials
|
| 7 |
RUN apt-get update && apt-get install -y wget && rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
+
# 1. Install PREBUILT llama-cpp-python (Community HF Space version)
|
| 10 |
+
# This wheel is optimized for the HF Free Tier (16GB RAM)
|
| 11 |
RUN pip install --no-cache-dir \
|
| 12 |
+
https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
|
| 13 |
|
| 14 |
# 2. Install web dependencies
|
| 15 |
RUN pip install --no-cache-dir fastapi uvicorn[standard] requests
|
| 16 |
|
| 17 |
+
# 3. Setup models folder and download GPT-OSS-20B
|
| 18 |
RUN mkdir -p ./models
|
| 19 |
RUN wget -q -O ./models/gpt-oss-20b-Q3_K_M.gguf \
|
| 20 |
https://huggingface.co/unsloth/gpt-oss-20b-GGUF/resolve/main/gpt-oss-20b-Q3_K_M.gguf
|