CooLLaMACEO commited on
Commit
bb64fa0
·
verified ·
1 Parent(s): f80f969

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -2,19 +2,23 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system tools
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Install Python requirements
12
- RUN pip install --no-cache-dir fastapi uvicorn llama-cpp-python
 
 
 
 
13
 
14
- # Download MPT-7B Q2 from your specific link
15
  RUN curl -L "https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true" -o mpt-7b-q2.gguf
16
 
17
- # Only copy the backend code
18
  COPY app.py .
19
 
20
  EXPOSE 7860
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system tools (curl for the model, build-essential just in case)
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Fix: Use the pre-built CPU wheel to skip the "Building wheel" step
12
+ RUN pip install --no-cache-dir \
13
+ fastapi \
14
+ uvicorn \
15
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
16
+ llama-cpp-python
17
 
18
+ # Download MPT-7B Q2 from the link you provided
19
  RUN curl -L "https://huggingface.co/maddes8cht/mosaicml-mpt-7b-chat-gguf/resolve/main/mosaicml-mpt-7b-chat-Q2_K.gguf?download=true" -o mpt-7b-q2.gguf
20
 
21
+ # Copy backend only
22
  COPY app.py .
23
 
24
  EXPOSE 7860