fixes for the service layer. Updated readme.
This commit is contained in:
@@ -215,18 +215,24 @@ docker tag guardian-newscast truenas.local:30095/guardian-newscast:latest
|
||||
docker push truenas.local:30095/guardian-newscast:latest
|
||||
```
|
||||
|
||||
### Deploying on TrueNAS
|
||||
#### Cross-platform builds
|
||||
|
||||
For Intel (x86_64):
|
||||
|
||||
```bash
|
||||
docker pull truenas.local:30095/guardian-newscast:latest
|
||||
docker run -d \
|
||||
--name guardian-newscast \
|
||||
--network host \
|
||||
-v /path/to/data:/app/data \
|
||||
-e OLLAMA_URL=http://127.0.0.1:11434/api/generate \
|
||||
-e PORT=30095 \
|
||||
--restart unless-stopped \
|
||||
truenas.local:30095/guardian-newscast:latest
|
||||
docker buildx build --platform linux/amd64 -t guardian-newscast:amd64 .
|
||||
```
|
||||
|
||||
For ARM (aarch64 / Apple Silicon):
|
||||
|
||||
```bash
|
||||
docker buildx build --platform linux/arm64 -t guardian-newscast:arm64 .
|
||||
```
|
||||
|
||||
To build and push both variants as a single multi-arch manifest:
|
||||
|
||||
```bash
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t truenas.local:30095/guardian-newscast:latest --push .
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
@@ -242,14 +248,10 @@ docker compose --profile full up -d
|
||||
### GPU Acceleration
|
||||
|
||||
The default Dockerfile uses `python:3.11-slim` (Debian), which has glibc — fully compatible with NVIDIA CUDA.
|
||||
|
||||
To run with GPU acceleration on TrueNAS:
|
||||
1. Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).
|
||||
2. Build with CUDA-enabled torch:
|
||||
1. Build with CUDA-enabled torch:
|
||||
```bash
|
||||
docker build --target gpu -t guardian-newscast:gpu .
|
||||
```
|
||||
(Add a `FROM python:3.11-slim AS gpu` stage with `pip install torch --index-url https://download.pytorch.org/whl/cu121`)
|
||||
3. Run with `--gpus all`.
|
||||
4. Minimum **4 GB VRAM** recommended for Ollama + Kokoro in the same container.
|
||||
|
||||
4. Minimum **4 GB VRAM** recommended for Ollama + Kokoro in the same container.
|
||||
Reference in New Issue
Block a user