truegleai commited on
Commit
532f2dd
·
1 Parent(s): 9d40b08

Use pre-built wheel and tiny model

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -6
  2. requirements.txt +2 -1
Dockerfile CHANGED
@@ -1,13 +1,16 @@
1
  FROM python:3.10-slim
2
- RUN apt-get update && apt-get install -y gcc g++ make cmake
3
  RUN useradd -m -u 1000 user
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
 
6
  WORKDIR /app
7
- COPY requirements.txt .
8
- RUN pip install --upgrade pip
9
- RUN pip install fastapi uvicorn huggingface-hub
10
- RUN pip install llama-cpp-python
11
- COPY . .
 
 
12
  EXPOSE 7860
13
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
+
3
  RUN useradd -m -u 1000 user
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
  WORKDIR /app
8
+
9
+ COPY --chown=user requirements.txt .
10
+ RUN pip install --no-cache-dir --upgrade pip
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ COPY --chown=user . .
14
+
15
  EXPOSE 7860
16
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -1,4 +1,5 @@
1
  fastapi
2
  uvicorn
3
- llama-cpp-python
4
  huggingface-hub
 
 
 
1
  fastapi
2
  uvicorn
 
3
  huggingface-hub
4
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
5
+ llama-cpp-python