Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09c627b

Browse filesBrowse files
authored
Merge pull request #6 from th-neu/th-neu-dockerfile-ubuntu
Update Dockerfile
2 parents ce5eb15 + e6565f5 commit 09c627b
Copy full SHA for 09c627b

File tree

Expand file treeCollapse file tree

1 file changed

+14
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-8
lines changed

‎Dockerfile

Copy file name to clipboard
+14-8Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
FROM python:3-slim-bullseye
1+
# build stage
2+
FROM ubuntu:22.04 AS builder
23

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
57

68
COPY . .
79

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
1115

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
1318

1419
# Run the server
15-
CMD python3 -m llama_cpp.server
20+
CMD ["python3" "-m" "llama_cpp.server"]
21+
#CMD python3 -m llama_cpp.server

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.