Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +2 -16
Dockerfile
CHANGED
|
@@ -14,22 +14,8 @@ RUN python3 -c 'from huggingface_hub import hf_hub_download; \
|
|
| 14 |
hf_hub_download(repo_id=repo, filename="Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", local_dir="/app"); \
|
| 15 |
hf_hub_download(repo_id=repo, filename="mmproj-Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-f16.gguf", local_dir="/app")'
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
RUN
|
| 19 |
-
css = "<style>body, html { background: linear-gradient(135deg, #0f172a, #2e1065) !important; color: #f3e8ff !important; } .chat-message, textarea, input, select { background-color: #1e1b4b !important; border: 1px solid #7e22ce !important; color: #ffffff !important; } button { background: linear-gradient(90deg, #4f46e5, #9333ea) !important; color: #ffffff !important; border: none !important; }</style></head>"; \
|
| 20 |
-
search_dirs = ["/app", "/llama.cpp", "/public", "/usr/local/share"]; \
|
| 21 |
-
found = False; \
|
| 22 |
-
for sdir in search_dirs: \
|
| 23 |
-
if os.path.exists(sdir): \
|
| 24 |
-
for root, _, files in os.walk(sdir): \
|
| 25 |
-
if "index.html" in files: \
|
| 26 |
-
fpath = os.path.join(root, "index.html"); \
|
| 27 |
-
content = open(fpath, "r").read(); \
|
| 28 |
-
if "</head>" in content: \
|
| 29 |
-
open(fpath, "w").write(content.replace("</head>", css)); \
|
| 30 |
-
print(f"Theme injected into: {fpath}"); \
|
| 31 |
-
found = True; \
|
| 32 |
-
'
|
| 33 |
|
| 34 |
CMD ["--server", \
|
| 35 |
"-m", "/app/Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", \
|
|
|
|
| 14 |
hf_hub_download(repo_id=repo, filename="Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", local_dir="/app"); \
|
| 15 |
hf_hub_download(repo_id=repo, filename="mmproj-Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-f16.gguf", local_dir="/app")'
|
| 16 |
|
| 17 |
+
# Blue-Purple CSS injection using Linux 'sed' (Fast & Syntax-Error Free)
|
| 18 |
+
RUN find / -name "index.html" 2>/dev/null | xargs -I {} sed -i 's|</head>|<style>body, html { background: linear-gradient(135deg, #0f172a, #2e1065) !important; color: #f3e8ff !important; } .chat-message, textarea, input, select { background-color: #1e1b4b !important; border: 1px solid #7e22ce !important; color: #ffffff !important; } button { background: linear-gradient(90deg, #4f46e5, #9333ea) !important; color: #ffffff !important; border: none !important; }</style></head>|g' {} || true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
CMD ["--server", \
|
| 21 |
"-m", "/app/Gemma-4-E2B-Uncensored-HauhauCS-Aggressive-Q6_K_P.gguf", \
|