mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: update Docker configuration for improved GPU support and streamline service definitions
This commit is contained in:
+4
-1
@@ -148,7 +148,7 @@ RUN for i in 1 2 3; do apt-get -o Acquire::Retries=3 update && break || sleep $(
|
|||||||
potrace \
|
potrace \
|
||||||
curl \
|
curl \
|
||||||
gosu \
|
gosu \
|
||||||
libheif-examples libheif-plugin-x265 \
|
libheif-examples \
|
||||||
libimage-exiftool-perl \
|
libimage-exiftool-perl \
|
||||||
python3 python3-pip python3-venv python3-dev \
|
python3 python3-pip python3-venv python3-dev \
|
||||||
tesseract-ocr tesseract-ocr-eng tesseract-ocr-deu tesseract-ocr-fra tesseract-ocr-spa \
|
tesseract-ocr tesseract-ocr-eng tesseract-ocr-deu tesseract-ocr-fra tesseract-ocr-spa \
|
||||||
@@ -157,6 +157,9 @@ RUN for i in 1 2 3; do apt-get -o Acquire::Retries=3 update && break || sleep $(
|
|||||||
libgl1 libglib2.0-0 \
|
libgl1 libglib2.0-0 \
|
||||||
libegl1 libwayland-egl1 libwayland-client0 libwayland-cursor0 \
|
libegl1 libwayland-egl1 libwayland-client0 libwayland-cursor0 \
|
||||||
libxkbcommon-x11-0 libxkbcommon0 libxcursor1 \
|
libxkbcommon-x11-0 libxkbcommon0 libxcursor1 \
|
||||||
|
&& if apt-cache show libheif-plugin-x265 >/dev/null 2>&1; then \
|
||||||
|
apt-get install -y --no-install-recommends libheif-plugin-x265; \
|
||||||
|
fi \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Caire binary (content-aware seam carving)
|
# Caire binary (content-aware seam carving)
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
services:
|
||||||
|
ashim:
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
reservations:
|
||||||
|
devices:
|
||||||
|
- driver: nvidia
|
||||||
|
count: all
|
||||||
|
capabilities: [gpu]
|
||||||
+30
-47
@@ -1,57 +1,40 @@
|
|||||||
name: ashim
|
name: ashim
|
||||||
|
|
||||||
# Usage:
|
# Usage:
|
||||||
# CPU: docker compose --profile cpu up -d
|
# CPU: docker compose up -d
|
||||||
# GPU: docker compose --profile gpu up -d
|
# GPU: docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
|
||||||
|
# (requires NVIDIA GPU + nvidia-container-toolkit; not supported on macOS)
|
||||||
x-common: &common
|
|
||||||
build:
|
|
||||||
context: ..
|
|
||||||
dockerfile: docker/Dockerfile
|
|
||||||
image: ashim:latest
|
|
||||||
ports:
|
|
||||||
- "1349:1349"
|
|
||||||
volumes:
|
|
||||||
- ashim-data:/data
|
|
||||||
- ashim-workspace:/tmp/workspace
|
|
||||||
environment:
|
|
||||||
- AUTH_ENABLED=true
|
|
||||||
- DEFAULT_USERNAME=admin
|
|
||||||
- DEFAULT_PASSWORD=admin
|
|
||||||
- SKIP_MUST_CHANGE_PASSWORD=${SKIP_MUST_CHANGE_PASSWORD:-false}
|
|
||||||
- RATE_LIMIT_PER_MIN=${RATE_LIMIT_PER_MIN:-100}
|
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:1349/api/v1/health"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 5s
|
|
||||||
start_period: 60s
|
|
||||||
retries: 3
|
|
||||||
logging:
|
|
||||||
driver: json-file
|
|
||||||
options:
|
|
||||||
max-size: "10m"
|
|
||||||
max-file: "3"
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
ashim:
|
ashim:
|
||||||
<<: *common
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: docker/Dockerfile
|
||||||
|
image: ashim:latest
|
||||||
container_name: ashim
|
container_name: ashim
|
||||||
profiles:
|
ports:
|
||||||
- cpu
|
- "1349:1349"
|
||||||
|
volumes:
|
||||||
ashim-gpu:
|
- ashim-data:/data
|
||||||
<<: *common
|
- ashim-workspace:/tmp/workspace
|
||||||
container_name: ashim-gpu
|
environment:
|
||||||
profiles:
|
- AUTH_ENABLED=true
|
||||||
- gpu
|
- DEFAULT_USERNAME=admin
|
||||||
deploy:
|
- DEFAULT_PASSWORD=admin
|
||||||
resources:
|
- SKIP_MUST_CHANGE_PASSWORD=${SKIP_MUST_CHANGE_PASSWORD:-false}
|
||||||
reservations:
|
- RATE_LIMIT_PER_MIN=${RATE_LIMIT_PER_MIN:-100}
|
||||||
devices:
|
restart: unless-stopped
|
||||||
- driver: nvidia
|
healthcheck:
|
||||||
count: all
|
test: ["CMD", "curl", "-f", "http://localhost:1349/api/v1/health"]
|
||||||
capabilities: [gpu]
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
start_period: 60s
|
||||||
|
retries: 3
|
||||||
|
logging:
|
||||||
|
driver: json-file
|
||||||
|
options:
|
||||||
|
max-size: "10m"
|
||||||
|
max-file: "3"
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ashim-data:
|
ashim-data:
|
||||||
|
|||||||
Reference in New Issue
Block a user