Closed Firestorm7893 closed 3 months ago
The dockers are maintained by @henk717 so they might have to take a look. They are conda based I believe.
It is certainly going to be your docker setup, the bigger question is why. The KCPP_ARGS line looks wrong to me so that may have something to do with it. I expect something like KCPP_ARGS=--usecublas --gpulayers 99 --model locationofgguf
. Defining them seperately isn't what I am doing myself on the templates for the providers and not a tested method.
If nvidia-smi is missing this is a docker side issue. The template doesn't ship with any cuda related driver files on purpose. In a healthy docker setup such as the one on runpod, and docker-desktop it automatically injects the correct driver including nvidia-smi when you passtrough the GPU.
So its possible you dont have the correct GPU passtrough method I know there are two competing ones for Linux and I dont know if both do it. To my knowledge the correct one is not the seperate nvidia docker runtime but the newer one that integrates into the official docker.
Something like this should have nvidia-smi in a healthy docker environment docker run --gpus all -it debian bash
that one uses the modern gpus method rather than your old nvidia runtime method. If that works and you get nvidia-smi inside the debian docker our docker is based off your setup is correct. If so we can assume the docker-compose is wrong. Removing runtime=nvidia might be enough to get it to stop using the old depreciated nvidia runtime.
Update: This is the docker-compose that works for me:
version: "3.2"
services:
koboldcpp:
container_name: koboldcpp
image: koboldai/koboldcpp:latest
volumes:
- ./:/content/:ro
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
environment:
- KCPP_ARGS=--model /content/model.gguf --usecublas --gpulayers 99 --multiuser 20 --quiet
ports:
- "5001:5001"
with this configuration works! (maybe we could add this example to the docs)
Thanks!
Already added it as an integrated example, if the docker is launched without any environment variables it now comes up with instructions. Those refer to docker run --rm -it koboldai/koboldcpp compose-example
.
Describe the Issue I cannot get the docker container of koboldcpp to detect my cuda installation on the host Eg. nvidia-smi returns always command not found :(.
I'm trying to set everything up trough docker compose. I know my docker setup works since I have other containers that use the gpus with no problems.
this is the compose for koboldcpp
this is a compose file for another container where the gpu works:
Additional Information: System specs:
Should I build my own docker image using nvidia's cuda images as a base?