Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# General Ignore
.git
.github
.vscode
.dockerignore
.gitignore
README.md
Dockerfile
docker-compose.yaml

# Unique to distributed-llama
report
docs
examples
models
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y \
git build-essential \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

COPY . /app
RUN make dllama && make dllama-api

# Default ports for root node + worker node
EXPOSE 5000
EXPOSE 9999

CMD ["./dllama"]
47 changes: 47 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
services:
root:
build: .
networks:
- llama-net
volumes:
- ./models:/models
depends_on:
- worker1
- worker2
- worker3
ports:
- "5000:5000"
restart: on-failure
command: >-
./dllama-api
--model /models/dllama_model_llama3.2-1b-instruct_q40.m
--tokenizer /models/dllama_tokenizer_llama3_2.t
--buffer-float-type q80 --nthreads 2 --port 5000
--workers worker1:9999 worker2:9999 worker3:9999

worker1:
build: .
ports:
- "9999:9999"
networks:
- llama-net
command: >
./dllama worker --port 9999 --nthreads 2

worker2:
build: .
networks:
- llama-net
command: >
./dllama worker --port 9999 --nthreads 2

worker3:
build: .
networks:
- llama-net
command: >
./dllama worker --port 9999 --nthreads 2

networks:
llama-net:
driver: bridge