docker image is reduced in size

This commit is contained in:
2026-09-24 18:17:15 +03:00
parent f527872642
commit 19d67b7a26
3 changed files with 8 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
ARG GPU=nvidia
FROM nvidia/cuda:13.0.2-cudnn-runtime-ubuntu24.04 AS base-nvidia
FROM rocm/dev-ubuntu-24.04:7.2.1-complete AS base-amd
FROM rocm/dev-ubuntu-24.04:7.2.1 AS base-amd
FROM base-${GPU} AS app

View File

@@ -31,14 +31,14 @@ cp input.mkv "$WORK_DIR/"
# nvidia
docker run --rm --gpus all -e AI_API_KEY \
--mount type=volume,src=sumka-whisper-cache,dst=/root/.cache/whisper \
--mount type=volume,src=whisper-cache,dst=/tmp/sumka-cache/whisper \
--mount type=bind,src="$WORK_DIR",dst=/work \
--tmpfs /tmp:rw,size=8g sumka:nvidia
# amd
docker run --rm --device=/dev/kfd --device=/dev/dri --group-add video \
--security-opt seccomp=unconfined -e AI_API_KEY \
--mount type=volume,src=sumka-whisper-cache,dst=/root/.cache/whisper \
--mount type=volume,src=whisper-cache,dst=/tmp/sumka-cache/whisper \
--mount type=bind,src="$WORK_DIR",dst=/work \
--tmpfs /tmp:rw,size=8g sumka:amd
```

5
start_amd.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/bash
mkdir runtime &> /dev/null
docker run --device=/dev/kfd --device=/dev/dri --group-add video --security-opt seccomp=unconfined -e AI_API_KEY --mount type=bind,src=./runtime,dst=/work --mount type=volume,src=whisper-cache,dst=/tmp/sumka-cache/whisper --tmpfs /tmp:rw,size=8g sumka:amd --resolver-ai-model google/gemini-3.8-flash --structure-ai-model google/gemini-3.8-flash --refiner-ai-model google/gemini-3.8-flash