theutkarshjaiswal commited on
Commit
b399677
·
verified ·
1 Parent(s): 21fd0d6

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies for llama-cpp-python
6
+ RUN apt-get update && apt-get install -y \
7
+ curl wget cmake build-essential git \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install Python dependencies
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # Copy app files
15
+ COPY download_model.py .
16
+ COPY server.py .
17
+
18
+ # Download the GGUF model at build time
19
+ RUN python download_model.py
20
+
21
+ EXPOSE 7860
22
+
23
+ CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]