Spaces:
Sleeping
Sleeping
Optimize build speed
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
|
@@ -1,16 +1,18 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
# Install
|
| 4 |
-
RUN apt-get update && apt-get install -y wget
|
| 5 |
|
| 6 |
-
# Install llama-cpp-python
|
| 7 |
-
RUN pip install
|
|
|
|
|
|
|
| 8 |
|
| 9 |
-
# Download your custom J.A.R.V.I.S. model weights
|
| 10 |
RUN wget https://huggingface.co/omjhamtani77/Jarvis-3B-Core/resolve/main/jarvis.gguf -O model.gguf
|
| 11 |
|
| 12 |
# Expose the standard routing port Hugging Face reads
|
| 13 |
EXPOSE 7860
|
| 14 |
|
| 15 |
-
# Boot up the server engine with a standard context
|
| 16 |
CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "2048"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Install wget to download the model file (removed heavy build-essential tools)
|
| 4 |
+
RUN apt-get update && apt-get install -y wget
|
| 5 |
|
| 6 |
+
# Install llama-cpp-python using a pre-compiled CPU wheel to bypass the compilation wait time
|
| 7 |
+
RUN pip install --upgrade pip
|
| 8 |
+
RUN pip install llama-cpp-python[server] --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 9 |
+
RUN pip install huggingface_hub
|
| 10 |
|
| 11 |
+
# Download your custom J.A.R.V.I.S. model weights straight into the container
|
| 12 |
RUN wget https://huggingface.co/omjhamtani77/Jarvis-3B-Core/resolve/main/jarvis.gguf -O model.gguf
|
| 13 |
|
| 14 |
# Expose the standard routing port Hugging Face reads
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
+
# Boot up the server engine with a standard 2048 context window
|
| 18 |
CMD ["python3", "-m", "llama_cpp.server", "--model", "model.gguf", "--host", "0.0.0.0", "--port", "7860", "--n_ctx", "2048"]
|