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]
|
||||||
@@ -1,14 +1,17 @@
|
|||||||
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
|
services:
|
||||||
|
ashim:
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: docker/Dockerfile
|
dockerfile: docker/Dockerfile
|
||||||
image: ashim:latest
|
image: ashim:latest
|
||||||
|
container_name: ashim
|
||||||
ports:
|
ports:
|
||||||
- "1349:1349"
|
- "1349:1349"
|
||||||
volumes:
|
volumes:
|
||||||
@@ -33,26 +36,6 @@ x-common: &common
|
|||||||
max-size: "10m"
|
max-size: "10m"
|
||||||
max-file: "3"
|
max-file: "3"
|
||||||
|
|
||||||
services:
|
|
||||||
ashim:
|
|
||||||
<<: *common
|
|
||||||
container_name: ashim
|
|
||||||
profiles:
|
|
||||||
- cpu
|
|
||||||
|
|
||||||
ashim-gpu:
|
|
||||||
<<: *common
|
|
||||||
container_name: ashim-gpu
|
|
||||||
profiles:
|
|
||||||
- gpu
|
|
||||||
deploy:
|
|
||||||
resources:
|
|
||||||
reservations:
|
|
||||||
devices:
|
|
||||||
- driver: nvidia
|
|
||||||
count: all
|
|
||||||
capabilities: [gpu]
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ashim-data:
|
ashim-data:
|
||||||
ashim-workspace:
|
ashim-workspace:
|
||||||
|
|||||||
Reference in New Issue
Block a user