sinhal commited on
Commit
1c9f34f
·
verified ·
1 Parent(s): 0fbbe6a

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -1,16 +1,16 @@
1
  FROM python:3.10-slim
2
 
3
- # Install system build tools
4
  RUN apt-get update && apt-get install -y \
5
- build-essential \
6
- cmake \
7
  curl \
8
- git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  WORKDIR /code
12
 
13
- # Copy requirements and install
 
 
 
14
  COPY requirements.txt /code/requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
@@ -21,4 +21,4 @@ COPY . /code
21
  EXPOSE 7860
22
 
23
  # Start server
24
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", 7860]
 
1
  FROM python:3.10-slim
2
 
3
+ # Install curl
4
  RUN apt-get update && apt-get install -y \
 
 
5
  curl \
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /code
9
 
10
+ # Install prebuilt CPU wheel for llama-cpp-python to bypass compilation
11
+ RUN pip install --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
12
+
13
+ # Copy requirements and install the rest of the dependencies
14
  COPY requirements.txt /code/requirements.txt
15
  RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
16
 
 
21
  EXPOSE 7860
22
 
23
  # Start server
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]