Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Launch by docker compose #811

Closed
Closed
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
8 changes: 8 additions & 0 deletions docker/CN/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.10

RUN pip install --upgrade pip setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple/
RUN pip install "xinference[all]" --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple/

EXPOSE 9997

CMD ["xinference", "-p", "9997", "-H", "0.0.0.0"]
21 changes: 21 additions & 0 deletions docker/CN/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.8'

services:
xinference:
container_name: xinference
image: xinference
build: .
ports:
- "9997:9997"
volumes:
- ./root:/root
environment:
- XINFERENCE_MODEL_SRC=modelscope
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

8 changes: 8 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM python:3.10

RUN pip install --upgrade pip setuptools
RUN pip install "xinference[all]" --upgrade

EXPOSE 9997

CMD ["xinference", "-p", "9997", "-H", "0.0.0.0"]
21 changes: 21 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.8'

services:
xinference:
container_name: xinference
image: xinference
build: .
ports:
- "9997:9997"
volumes:
- ./root:/root
environment:
- XINFERENCE_MODEL_SRC=huggingface
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]