Skip to content

Commit

Permalink
fixed docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
codearranger committed Jun 22, 2023
1 parent b968727 commit dc8f62f
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 9 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
models/
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ lib/
lib64/
parts/
sdist/
models

var/
wheels/
models/
models/*
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile → Dockerfile-llmserver
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ WORKDIR /app

COPY . /app

RUN pip install -r requirements.txt

EXPOSE 7860
# upgrade pip
RUN pip3 install --upgrade pip

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8000

CMD ["python", "pilot/server/llmserver.py"]
CMD ["python", "pilot/server/webserver.py"]
CMD ["python3", "pilot/server/llmserver.py"]
21 changes: 21 additions & 0 deletions Dockerfile-webserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04

RUN apt-get update && apt-get install -y \
git \
python3 \
pip


WORKDIR /app

COPY . /app


# upgrade pip
RUN pip3 install --upgrade pip

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 7860

CMD ["python3", "pilot/server/webserver.py"]
23 changes: 20 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,31 @@ services:
volumes:
- my-db:/var/lib/mysql
restart: unless-stopped
db-gpt:
webserver:
build:
context: .
dockerfile: Dockerfile
container_name: db-gpt
dockerfile: Dockerfile-webserver
environment:
- MODEL_SERVER=https://llmserver:8000
- LOCAL_DB_HOST=db
env_file:
- .env
ports:
- 7860:7860
expose:
- 7860
restart: unless-stopped
llmserver:
build:
context: .
dockerfile: Dockerfile-llmserver
volumes:
- ./models:/app/models
env_file:
- .env
ports:
- 8000:8000
restart: unless-stopped
deploy:
resources:
reservations:
Expand All @@ -31,5 +46,7 @@ services:
device_ids: ['1', '0']
capabilities: [gpu]



volumes:
my-db:

0 comments on commit dc8f62f

Please sign in to comment.