Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +22 -27
Dockerfile
CHANGED
|
@@ -1,30 +1,25 @@
|
|
| 1 |
-
FROM
|
| 2 |
-
|
| 3 |
-
# GCC, G++, CMake aur Ninja install karein (Taki llama-cpp bina kisi missing compiler error ke build ho sake)
|
| 4 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
-
build-essential \
|
| 6 |
-
cmake \
|
| 7 |
-
ninja-build \
|
| 8 |
-
libgomp1 \
|
| 9 |
-
curl \
|
| 10 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
-
|
| 12 |
-
RUN useradd -m -u 1000 user
|
| 13 |
-
USER user
|
| 14 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 15 |
|
| 16 |
WORKDIR /app
|
| 17 |
|
| 18 |
-
|
| 19 |
-
RUN
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ghcr.io/ggml-org/llama.cpp:full
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
RUN apt update && apt install -y python3 python3-pip python3-venv
|
| 6 |
+
RUN python3 -m venv /opt/venv
|
| 7 |
+
ENV PATH="/opt/venv/bin:$PATH"
|
| 8 |
+
|
| 9 |
+
RUN pip install -U pip huggingface_hub
|
| 10 |
+
|
| 11 |
+
RUN python3 -c 'from huggingface_hub import hf_hub_download; \
|
| 12 |
+
repo="HauhauCS/Gemma-4-E2B-Uncensored-HauhauCS-Aggressive"; \
|
| 13 |
+
hf_hub_download(repo_id=repo, filename="Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", local_dir="/app"); \
|
| 14 |
+
hf_hub_download(repo_id=repo, filename="mmproj-Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-f16.gguf", local_dir="/app")'
|
| 15 |
+
|
| 16 |
+
CMD ["--server", \
|
| 17 |
+
"-m", "/app/Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", \
|
| 18 |
+
"--mmproj", "/app/mmproj-Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-f16.gguf", \
|
| 19 |
+
"--host", "0.0.0.0", \
|
| 20 |
+
"--port", "7860", \
|
| 21 |
+
"-t", "2", \
|
| 22 |
+
"--cache-type-k", "q8_0", \
|
| 23 |
+
"--cache-type-v", "iq4_nl", \
|
| 24 |
+
"-c", "8192", \
|
| 25 |
+
"-n", "4096"]
|