File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed
Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 3636 push : true # push to registry
3737 pull : true # always fetch the latest base images
3838 platforms : linux/amd64,linux/arm64 # build for both amd64 and arm64
39- tags : ghcr.io/abetlen/llama-cpp-python:latest
39+ tags : ghcr.io/abetlen/llama-cpp-python:latest
40+
41+ docker-cuda :
42+ name : Build and push Docker image
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Checkout
46+ uses : actions/checkout@v3
47+ with :
48+ submodules : " true"
49+
50+ - name : Set up QEMU
51+ uses : docker/setup-qemu-action@v2
52+
53+ - name : Set up Docker Buildx
54+ uses : docker/setup-buildx-action@v2
55+
56+ - name : Login to GitHub Container Registry
57+ uses : docker/login-action@v2
58+ with :
59+ registry : ghcr.io
60+ username : ${{ github.repository_owner }}
61+ password : ${{ secrets.GITHUB_TOKEN }}
62+
63+ - name : Build and push
64+ uses : docker/build-push-action@v4
65+ with :
66+ file : Dockerfile.cuda
67+ context : .
68+ push : true # push to registry
69+ pull : true # always fetch the latest base images
70+ platforms : linux/amd64,linux/arm64 # build for both amd64 and arm64
71+ tags : ghcr.io/abetlen/llama-cpp-python-cuda:latest
Original file line number Diff line number Diff line change 1+ FROM nvidia/cuda:12.1.1-devel-ubuntu20.04
2+
3+ # We need to set the host to 0.0.0.0 to allow outside access
4+ ENV HOST 0.0.0.0
5+
6+ COPY . .
7+
8+ # Install the package
9+ RUN apt update && apt install -y python3 python3-pip
10+ RUN python3 -m pip install --upgrade pip pytest cmake scikit-build setuptools fastapi uvicorn sse-starlette
11+
12+ RUN LLAMA_CUBLAS=1 python3 setup.py develop
13+
14+ # Run the server
15+ CMD python3 -m llama_cpp.server
You can’t perform that action at this time.
0 commit comments