CooLLaMACEO commited on
Commit
b944aa7
·
verified ·
1 Parent(s): b884403

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -14
Dockerfile CHANGED
@@ -1,24 +1,14 @@
1
- # We use 'python:3.10' instead of 'slim' because the standard version
2
- # already has most tools installed, so we don't have to wait for 'apt-get'.
3
  FROM python:3.10
4
 
5
- # Set a working directory
6
  WORKDIR /app
7
 
8
- # Step 1: Install llama-cpp-python using the PRE-COMPILED link.
9
- # This is the "Magic Trick" to skip the 15-minute build.
10
- RUN pip install --no-cache-dir llama-cpp-python \
11
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
12
 
13
- # Step 2: Install your other requirements
14
  COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Step 3: Copy your code
18
  COPY . .
19
-
20
- # Hugging Face Spaces must run on port 7860
21
  EXPOSE 7860
22
-
23
- # Run your app
24
  CMD ["python", "app.py"]
 
 
 
1
  FROM python:3.10
2
 
 
3
  WORKDIR /app
4
 
5
+ # 1. Install the FAST version first
6
+ RUN pip install llama-cpp-python==0.3.2 --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
 
7
 
8
+ # 2. Install ONLY the web stuff (remove llama-cpp from requirements.txt!)
9
  COPY requirements.txt .
10
+ RUN pip install -r requirements.txt
11
 
 
12
  COPY . .
 
 
13
  EXPOSE 7860
 
 
14
  CMD ["python", "app.py"]