mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-29 14:57:35 +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/
|
lib64/
|
||||||
parts/
|
parts/
|
||||||
sdist/
|
sdist/
|
||||||
models
|
|
||||||
var/
|
var/
|
||||||
wheels/
|
wheels/
|
||||||
models/
|
models/*
|
||||||
pip-wheel-metadata/
|
pip-wheel-metadata/
|
||||||
share/python-wheels/
|
share/python-wheels/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
|
@ -10,10 +10,12 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . /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
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["python", "pilot/server/llmserver.py"]
|
CMD ["python3", "pilot/server/llmserver.py"]
|
||||||
CMD ["python", "pilot/server/webserver.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:
|
volumes:
|
||||||
- my-db:/var/lib/mysql
|
- my-db:/var/lib/mysql
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
db-gpt:
|
webserver:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile-webserver
|
||||||
container_name: db-gpt
|
environment:
|
||||||
|
- MODEL_SERVER=http://llmserver:8000
|
||||||
|
- LOCAL_DB_HOST=db
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
ports:
|
ports:
|
||||||
- 7860:7860
|
- 7860:7860
|
||||||
expose:
|
expose:
|
||||||
- 7860
|
- 7860
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
llmserver:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile-llmserver
|
||||||
|
volumes:
|
||||||
|
- ./models:/app/models
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
|
restart: unless-stopped
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
reservations:
|
reservations:
|
||||||
@ -31,5 +46,7 @@ services:
|
|||||||
device_ids: ['1', '0']
|
device_ids: ['1', '0']
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
my-db:
|
my-db:
|
||||||
|
Loading…
Reference in New Issue
Block a user