added new docker stack

This commit is contained in:
Gregory Craane 2023-07-15 09:43:20 +00:00
parent a84dee1be1
commit c4dc028a8d
5 changed files with 59 additions and 24 deletions

16
.env
View file

@ -1,12 +1,12 @@
## Set number of threads. ## Set number of threads.
## Note: prefer the number of physical cores. Overbooking the CPU degrades performance notably. ## Note: prefer the number of physical cores. Overbooking the CPU degrades performance notably.
# THREADS=14 #THREADS=6
## Specify a different bind address (defaults to ":8080") ## Specify a different bind address (defaults to ":8080")
# ADDRESS=127.0.0.1:8080 #ADDRESS=192.168.2.101:80
## Default models context size ## Default models context size
# CONTEXT_SIZE=512 #CONTEXT_SIZE=512
# #
## Define galleries. ## Define galleries.
## models will to install will be visible in `/models/available` ## models will to install will be visible in `/models/available`
@ -21,13 +21,13 @@
MODELS_PATH=/models MODELS_PATH=/models
## Enable debug mode ## Enable debug mode
# DEBUG=true DEBUG=true
## Specify a build type. Available: cublas, openblas, clblas. ## Specify a build type. Available: cublas, openblas, clblas.
# BUILD_TYPE=openblas BUILD_TYPE=cublas
## Uncomment and set to true to enable rebuilding from source ## Uncomment and set to true to enable rebuilding from source
# REBUILD=true REBUILD=false
## Enable go tags, available: stablediffusion, tts ## Enable go tags, available: stablediffusion, tts
## stablediffusion: image generation with stablediffusion ## stablediffusion: image generation with stablediffusion
@ -37,7 +37,7 @@ MODELS_PATH=/models
# GO_TAGS=stablediffusion # GO_TAGS=stablediffusion
## Path where to store generated images ## Path where to store generated images
# IMAGE_PATH=/tmp IMAGE_PATH=/tmp
## Specify a default upload limit in MB (whisper) ## Specify a default upload limit in MB (whisper)
# UPLOAD_LIMIT # UPLOAD_LIMIT

12
.gitignore vendored
View file

@ -29,4 +29,14 @@ release/
# Generated during build # Generated during build
backend-assets/ backend-assets/
/ggml-metal.metal /ggml-metal.metal
.env
pictures/cc1EUUHn.s
pictures/cc86q29b.s
pictures/cch1MqnM.s
pictures/ccj0ZrSv.s
pictures/ccl2gcGz.s
pictures/ccOMMq5C.s
cuda_12.0.0_525.60.13_linux.run
myapp
helloworld.cu

View file

@ -1,15 +0,0 @@
version: '3.6'
services:
api:
image: quay.io/go-skynet/local-ai:latest
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:8080
env_file:
- .env
volumes:
- ./models:/models:cached
command: ["/usr/bin/local-ai" ]

40
docker-compose.yml Normal file
View file

@ -0,0 +1,40 @@
version: '3.6'
services:
api:
container_name: local-ai
image: quay.io/go-skynet/local-ai:v0.19.0-cublas-cuda12
restart: always
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
ports:
- 8080:8080
environment:
- DEBUG=true
- MODELS_PATH=/models
- 'PRELOAD_MODELS=[{"url": "github:go-skynet/model-gallery/openllama_7b.yaml", "name": "gpt-3.5-turbo", "overrides": { "f16":true, "gpu_layers": 35, "mmap": true, "batch": 512 } } ]'
- THREADS=6
- BUILD_TYPE=cublas
- REBUILD=true
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=all
volumes:
- ./models:/models:cached
- ./pictures/:/tmp/
command: ["/usr/bin/local-ai"]
flowise:
container_name: flowise-ai
image: flowiseai/flowise:latest
restart: always
ports:
- 3000:3000
volumes:
- ~/.flowise:/root/.flowise
- ./logs:/logs/
command: /bin/sh -c "sleep 3; flowise start"

View file