Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -20
Dockerfile
CHANGED
|
@@ -10,26 +10,10 @@ ENV PATH="/opt/venv/bin:$PATH"
|
|
| 10 |
RUN pip install -U pip huggingface_hub gradio requests
|
| 11 |
|
| 12 |
# Download SmolLM2-1.7B-Instruct GGUF (Q4_K_M ~1GB, runs well on free CPU)
|
| 13 |
-
RUN python3 -c '
|
| 14 |
-
from huggingface_hub import hf_hub_download; \
|
| 15 |
-
hf_hub_download(\
|
| 16 |
-
repo_id="bartowski/SmolLM2-1.7B-Instruct-GGUF", \
|
| 17 |
-
filename="SmolLM2-1.7B-Instruct-Q4_K_M.gguf", \
|
| 18 |
-
local_dir="/app"\
|
| 19 |
-
)'
|
| 20 |
|
| 21 |
COPY app.py /app/app.py
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
CMD bash -c '\
|
| 25 |
-
/llama-server \
|
| 26 |
-
-m /app/SmolLM2-1.7B-Instruct-Q4_K_M.gguf \
|
| 27 |
-
--host 0.0.0.0 \
|
| 28 |
-
--port 8080 \
|
| 29 |
-
-t 2 \
|
| 30 |
-
-c 4096 \
|
| 31 |
-
-n 2048 \
|
| 32 |
-
--log-disable &
|
| 33 |
-
sleep 10 && \
|
| 34 |
-
python3 /app/app.py\
|
| 35 |
-
'
|
|
|
|
| 10 |
RUN pip install -U pip huggingface_hub gradio requests
|
| 11 |
|
| 12 |
# Download SmolLM2-1.7B-Instruct GGUF (Q4_K_M ~1GB, runs well on free CPU)
|
| 13 |
+
RUN python3 -c 'from huggingface_hub import hf_hub_download; hf_hub_download(repo_id="bartowski/SmolLM2-1.7B-Instruct-GGUF", filename="SmolLM2-1.7B-Instruct-Q4_K_M.gguf", local_dir="/app")'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
COPY app.py /app/app.py
|
| 16 |
+
COPY start.sh /app/start.sh
|
| 17 |
+
RUN chmod +x /app/start.sh
|
| 18 |
|
| 19 |
+
CMD ["/app/start.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|