CooLLaMACEO commited on
Commit
cf7a250
·
verified ·
1 Parent(s): 9774ed1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -12
Dockerfile CHANGED
@@ -1,26 +1,22 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y \
5
- libgomp1 \
6
- curl \
7
- && rm -rf /var/lib/apt/lists/*
8
 
9
  WORKDIR /app
10
 
11
- # 1. Install llama-cpp-python using the direct manylinux link
12
  RUN pip install --no-cache-dir \
13
  https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.2/llama_cpp_python-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
14
 
15
- # 2. Install Flask and Requests directly to avoid requirements.txt issues
16
- RUN pip install --no-cache-dir flask requests
17
 
18
- # 3. Copy your app code
19
  COPY . .
20
 
21
- # 4. Pre-download the model so the app starts instantly
22
- RUN curl -L "https://huggingface.co/CooLLaMACEO/CooLLaMA-Gemma2/resolve/main/gemma-2-2b-it.q3_k_m.gguf" -o model.gguf
23
-
24
  EXPOSE 7860
25
 
 
 
 
26
  CMD ["python", "app.py"]
 
1
  FROM python:3.10-slim
2
 
3
+ # System math library for Llama
4
+ RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*
 
 
 
5
 
6
  WORKDIR /app
7
 
8
+ # Install the fast engine
9
  RUN pip install --no-cache-dir \
10
  https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.2/llama_cpp_python-0.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
11
 
12
+ # Install web tools + HF tools so your app can download the other model
13
+ RUN pip install --no-cache-dir flask requests huggingface-hub
14
 
 
15
  COPY . .
16
 
 
 
 
17
  EXPOSE 7860
18
 
19
+ # This ensures Python prints logs immediately so you can see the download progress
20
+ ENV PYTHONUNBUFFERED=1
21
+
22
  CMD ["python", "app.py"]