- Docker running
- nvidia-smi running
Print out the GPUs available in docker:
docker run -it --rm --gpus all ubuntu nvidia-smi -L
Install localAI with animagine-xl and NVIDIA CUDA12:
docker run -ti -p 8080:8080 -e COMPEL=0 --gpus all localai/localai:v2.7.0-cublas-cuda12 animagine-xl
When the API is running, in another terminal, call this to apply the StableDiffusion model:
curl http://localhost:8080/models/apply -H "Content-Type: application/json" -d '{
"url": "github:go-skynet/model-gallery/stablediffusion.yaml"
}'
While the API is running call it like you would call OpenAI, like this:
curl http://localhost:8080/v1/images/generations -H "Content-Type: application/json" -d '{
"prompt": "A cute baby sea otter",
"size": "256x256"
}'