Add Docker support: Dockerfile, compose, docs and CI#9
Closed
denyncrawford wants to merge 2 commits intoLibreTranslate:mainfrom
Closed
Add Docker support: Dockerfile, compose, docs and CI#9denyncrawford wants to merge 2 commits intoLibreTranslate:mainfrom
denyncrawford wants to merge 2 commits intoLibreTranslate:mainfrom
Conversation
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Add Docker support: configurable CUDA/Vulkan builds, macOS Metal artifact, compose and docs
Summary
What changed
How to test locally
CPU (default)
docker build -t denyncrawford/ltengine:cpu .
mkdir -p models
docker run --rm -p 8080:8080 -v $(pwd)/models:/models denyncrawford/ltengine:cpu --model-file /models/custom.gguf
Vulkan
docker build --build-arg FEATURES=vulkan -t denyncrawford/ltengine:vulkan .
docker run --rm -p 8080:8080 -v $(pwd)/models:/models -v /dev/dri:/dev/dri denyncrawford/ltengine:vulkan --model-file /models/custom.gguf
CUDA
docker build
--build-arg BASE_IMAGE=nvidia/cuda:12.4.1-devel-ubuntu22.04
--build-arg RUNTIME_BASE=nvidia/cuda:12.4.1-runtime-ubuntu22.04
--build-arg FEATURES=cuda
-t denyncrawford/ltengine:cuda .
docker run --gpus all --rm -p 8080:8080 -v $(pwd)/models:/models denyncrawford/ltengine:cuda --model-file /models/custom.gguf
Metal (macOS)
Build on macOS:
cargo build --release --manifest-path ltengine/Cargo.toml --features metal
The repo's CI produces a macOS artifact for users who need Metal builds.
Notes / Caveats
Checklist for maintainers
ltengineor update paths in Dockerfile.