diff --git a/.env b/.env index 890ff948..de0d36a4 100644 --- a/.env +++ b/.env @@ -1,12 +1,12 @@ ## Set number of threads. ## 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") -# ADDRESS=127.0.0.1:8080 +#ADDRESS=192.168.2.101:80 ## Default models context size -# CONTEXT_SIZE=512 +#CONTEXT_SIZE=512 # ## Define galleries. ## models will to install will be visible in `/models/available` @@ -21,13 +21,13 @@ MODELS_PATH=/models ## Enable debug mode -# DEBUG=true +DEBUG=true ## Specify a build type. Available: cublas, openblas, clblas. -# BUILD_TYPE=openblas +BUILD_TYPE=cublas ## Uncomment and set to true to enable rebuilding from source -# REBUILD=true +REBUILD=false ## Enable go tags, available: stablediffusion, tts ## stablediffusion: image generation with stablediffusion @@ -37,7 +37,7 @@ MODELS_PATH=/models # GO_TAGS=stablediffusion ## Path where to store generated images -# IMAGE_PATH=/tmp +IMAGE_PATH=/tmp ## Specify a default upload limit in MB (whisper) -# UPLOAD_LIMIT +# UPLOAD_LIMIT \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8ad9f228..193996a6 100644 --- a/.gitignore +++ b/.gitignore @@ -29,4 +29,14 @@ release/ # Generated during build backend-assets/ -/ggml-metal.metal \ No newline at end of file +/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 diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index 6217b9f6..00000000 --- a/docker-compose.yaml +++ /dev/null @@ -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" ] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..555cf88f --- /dev/null +++ b/docker-compose.yml @@ -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" \ No newline at end of file diff --git a/models/.keep b/models/.keep deleted file mode 100644 index e69de29b..00000000