Add Docker container capability - #295
Open
recrudesce wants to merge 2 commits into
Open
Conversation
Open
|
Two install traps worth guarding against in this Dockerfile, both hit on a stock
With those two, the pytorch devel image works as a second base: driver ≥ 580 / |
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.
Summary of Changes
Adds complete Docker and Docker Compose support for deploying FreeToken with GPU acceleration and native Hugging Face model integration.
What's Changed
Dockerfile:nvidia/cuda:13.3.1-devel-ubuntu26.04as the base image to providenvccand CUDA headers needed for FreeToken's C++ extensions and JIT kernel compilation.CUDA_HOME,CPATH,LIBRARY_PATH,LD_LIBRARY_PATH) to ensure compilation headers (e.g.cuda_runtime_api.h) are resolved without errors.uvwith a pinned Python 3.11 virtual environment to adhere to PEP 668 and avoid ABI mismatches with PyTorch extension builds.freetoken[accel]with pre-installed build toolchain (torch,setuptools,wheel,ninja).ft serveas the container entrypoint exposing port1919.docker-compose.yml:ipc: hostto allocate sufficient shared memory for tensor parallelism and KV cache operations.~/.cache/huggingfaceto persist downloaded model weights across container restarts.MODEL_NAMEenvironment variable.Configuration & Documentation:
DOCKER_README.mdcontaining end-to-end instructions for building, configuring, running via Compose or CLI, and verifying inference via OpenAI-compatible endpoints.Verification
ft serveand pulls model weights directly from Hugging Face into the mounted cache volume.http://127.0.0.1:1919/v1/chat/completions.