services: | |
server: | |
build: | |
dockerfile: Dockerfile | |
image: ghcr.io/matatonic/openedai-moderations | |
ports: | |
- 5002:5002 | |
command: ["python", "moderations.py", "--host", "0.0.0.0", "--port", "5002"] | |
# You can remove the following lines if you don't need GPU support | |
# Note: You need to have nvidia-docker installed and the host machine needs to have a GPU. | |
# Also, you need to have nvidia-container-toolkit installed on the host machine. | |
runtime: nvidia | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- driver: nvidia | |
#device_ids: ['0', '1'] # Select a gpu, or | |
count: all | |
capabilities: [gpu] | |