File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Original file line number Diff line number Diff line change 1
- FROM python:3-slim-bullseye
1
+ # build stage
2
+ FROM ubuntu:22.04 AS builder
2
3
3
- # We need to set the host to 0.0.0.0 to allow outside access
4
- ENV HOST 0.0.0.0
4
+ # Install the package
5
+ RUN apt-get update && apt-get install -y libopenblas-dev ninja-build build-essential python3
6
+ RUN python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette
5
7
6
8
COPY . .
7
9
8
- # Install the package
9
- RUN apt update && apt install -y libopenblas-dev ninja-build build-essential
10
- RUN python -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette
10
+ # Install llama_cpp_python
11
+ RUN LLAMA_OPENBLAS=1 python3 setup.py install
12
+
13
+ # final stage
14
+ FROM builder
11
15
12
- RUN LLAMA_OPENBLAS=1 python3 setup.py develop
16
+ # We need to set the host to 0.0.0.0 to allow outside access
17
+ ENV HOST 0.0.0.0
13
18
14
19
# Run the server
15
- CMD python3 -m llama_cpp.server
20
+ CMD ["python3" "-m" "llama_cpp.server" ]
21
+ # CMD python3 -m llama_cpp.server
You can’t perform that action at this time.
0 commit comments