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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,24 +1,23 @@
1
- FROM python:3.10-slim
 
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
 
1
+ # Using bullseye for better compatibility with build tools
2
+ FROM python:3.10-bullseye
3
 
4
  WORKDIR /app
5
 
6
+ # Install curl to download the model
7
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
 
 
 
8
 
9
+ # Fix: This is the magic line that skips the "Building wheel" phase
10
+ # It pulls a pre-compiled CPU binary for llama-cpp-python
11
  RUN pip install --no-cache-dir \
12
  fastapi \
13
  uvicorn \
14
  --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
15
  llama-cpp-python
16
 
17
+ # Download MPT-7B Q2
18
  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
19
 
20
+ # Copy your backend code
21
  COPY app.py .
22
 
23
  EXPOSE 7860