Add universal docker image · mpreziuso/llama-cpp-python@ca11673 · GitHub
Skip to content

Commit ca11673

Browse files
committed
Add universal docker image
1 parent 57d8ec3 commit ca11673

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Makefile

Lines changed: 7 additions & 0 deletions

docker/simple/Dockerfile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Define the image argument and provide a default value
2+
ARG IMAGE=python:3-slim-bullseye
3+
4+
# Use the image as specified
5+
FROM ${IMAGE}
6+
7+
# Re-declare the ARG after FROM
8+
ARG IMAGE
9+
10+
# Update and upgrade the existing packages
11+
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \
12+
python3 \
13+
python3-pip \
14+
ninja-build \
15+
build-essential
16+
17+
RUN mkdir /app
18+
WORKDIR /app
19+
COPY . /app
20+
21+
RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette
22+
23+
RUN make build && make clean
24+
25+
# Set environment variable for the host
26+
ENV HOST=0.0.0.0
27+
ENV PORT=8000
28+
29+
# Expose a port for the server
30+
EXPOSE 8000
31+
32+
# Run the server start script
33+
CMD ["/bin/sh", "/app/docker/simple/run.sh"]

docker/simple/run.sh

Lines changed: 4 additions & 0 deletions

0 commit comments

Comments
 (0)