Open
Conversation
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.
1. High-Level Summary (TL;DR)
flashinferlibrary along with system dependencies..git,.venv, caches, and build artifacts to optimize image build speed.2. Visual Overview (Code & Logic Map)
graph TD %% Style definition (high contrast) classDef host fill:#bbdefb,color:#0d47a1,stroke:#0d47a1 classDef docker fill:#c8e6c9,color:#1a5e20,stroke:#1a5e20 classDef volume fill:#fff3e0,color:#e65100,stroke:#e65100 subgraph "Host Machine" User["Developer"]:::host Source["Local code directory (./)"]:::host end subgraph "Docker Environment" Compose["docker-compose.yml"]:::docker Container["lingbot-map container (CUDA 13.0)"]:::docker subgraph "Volumes" HFCache["hf_cache"]:::volume TorchCache["torch_cache"]:::volume end end User -->|"docker compose run"| Compose Compose -->|"Build & Start"| Container Source -.->|"Mount workspace (/workspace)"| Container Container -.->|"Persistent read/write"| HFCache Container -.->|"Persistent read/write"| TorchCache3. Detailed Change Analysis
🐳 Docker Containerization Configuration
Description: Added full Docker support configuration, making it easy to replicate complex GPU/CUDA environments across different machines (source files:
Dockerfile,docker-compose.yml,.dockerignore).Base Environment & Dependencies (Dockerfile):
spxiong/pytorch:2.11.0-py3.10.19-cuda13.0.2-ubuntu22.04https://mirrors.aliyun.com/ubuntuUBUNTU_MIRROR)ffmpeg,libgl1,libsm6, etc.flashinfer-python,flashinfer-jit-cachecu130and the main project package.[vis]Environment & Resource Mounting (docker-compose.yml):
.:/workspacehf_cache:/root/.cache/huggingfacetorch_cache:/root/.cache/torch8080:8080all32gb📝 Documentation Update
Description: Updated user guide to support the new Docker workflow (source file:
README.md).docker compose build&docker compose run --rm --service-ports lingbot-map).demo.pyinside the container.Dockerfileto support other CUDA versions (e.g., downgrading from CUDA 13.0 to the more common CUDA 12.8).4. Impact & Risk Assessment
conda/pip.docker compose buildon a machine with NVIDIA drivers and Docker installed, verifying successful Alibaba Cloud mirror switching and dependency installation (network variations may cause APT/PIP download failures).nvidia-smiandpython -c "import torch; print(torch.cuda.is_available())in the terminal to confirm GPU detection.demo.pyinside the container to verifyflashinferand model inference work as expected without errors.