mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-24 12:45:45 +00:00
fixed docker compose
This commit is contained in:
parent
b968727836
commit
dc8f62f3f8
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
models/
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -25,10 +25,10 @@ lib/
|
||||
lib64/
|
||||
parts/
|
||||
sdist/
|
||||
models
|
||||
|
||||
var/
|
||||
wheels/
|
||||
models/
|
||||
models/*
|
||||
pip-wheel-metadata/
|
||||
share/python-wheels/
|
||||
*.egg-info/
|
||||
|
@ -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
Dockerfile-webserver
Normal file
21
Dockerfile-webserver
Normal file
@ -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"]
|
@ -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=http://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:
|
||||
@ -31,5 +46,7 @@ services:
|
||||
device_ids: ['1', '0']
|
||||
capabilities: [gpu]
|
||||
|
||||
|
||||
|
||||
volumes:
|
||||
my-db:
|
||||
|
Loading…
Reference in New Issue
Block a user