IDKHowToCodeFr commited on
Commit
026fe1f
·
1 Parent(s): 00235a3

fix(build): remove ollama from dockerfile & add cpu wheel index

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -10
  2. requirements.txt +2 -0
Dockerfile CHANGED
@@ -1,10 +1,7 @@
1
  FROM python:3.10-slim
2
 
3
  # System setup
4
- RUN apt-get update && apt-get install -y curl procps zstd && rm -rf /var/lib/apt/lists/*
5
-
6
- # Install Ollama via official script
7
- RUN curl -fsSL https://ollama.com/install.sh | sh
8
 
9
  WORKDIR /app
10
  COPY requirements.txt .
@@ -14,12 +11,7 @@ COPY . .
14
 
15
  # Environment Variables
16
  ENV PORT=8080
17
- ENV OLLAMA_HOST=127.0.0.1:11434
18
  ENV PYTHONUNBUFFERED=1
19
 
20
- # Execution Script: Starts Ollama, pulls Llama 3.2 (3B - Optimal for CPU), starts App
21
- RUN echo '#!/bin/bash\nollama serve & sleep 10 && ollama pull llama3.2 && python app.py' > /app/run.sh && \
22
- chmod +x /app/run.sh
23
-
24
  EXPOSE 8080
25
- CMD ["/app/run.sh"]
 
1
  FROM python:3.10-slim
2
 
3
  # System setup
4
+ RUN apt-get update && apt-get install -y procps zstd && rm -rf /var/lib/apt/lists/*
 
 
 
5
 
6
  WORKDIR /app
7
  COPY requirements.txt .
 
11
 
12
  # Environment Variables
13
  ENV PORT=8080
 
14
  ENV PYTHONUNBUFFERED=1
15
 
 
 
 
 
16
  EXPOSE 8080
17
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8080"]
requirements.txt CHANGED
@@ -6,4 +6,6 @@ python-dotenv
6
  openai
7
  groq
8
  google-generativeai
 
9
  llama-cpp-python
 
 
6
  openai
7
  groq
8
  google-generativeai
9
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
10
  llama-cpp-python
11
+