V12nm commited on
Commit
353d8b3
·
verified ·
1 Parent(s): 2c35c30

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -0
Dockerfile ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install necessary packages
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ curl \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Install llama-cpp-python server and huggingface-cli
10
+ RUN pip install llama-cpp-python[server] huggingface_hub
11
+
12
+ # Download Llama-3.2-3B-Instruct Q4_K_M model from bartowski
13
+ RUN huggingface-cli download bartowski/Llama-3.2-3B-Instruct-GGUF Llama-3.2-3B-Instruct-Q4_K_M.gguf --local-dir /app --local-dir-use-symlinks False
14
+
15
+ # Expose the API port
16
+ EXPOSE 7860
17
+
18
+ # Start the API server
19
+ CMD ["python3", "-m", "llama_cpp.server", "--model", "/app/Llama-3.2-3B-Instruct-Q4_K_M.gguf", "--host", "0.0.0.0", "--port", "7860"]