-
Notifications
You must be signed in to change notification settings - Fork 0
break up packages into docker layers #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,19 +11,26 @@ ENV DEBIAN_FRONTEND=noninteractive \ | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # System packages (if needed, keep minimal) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Upgrade pip and install Python deps | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install --upgrade pip && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pip install \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "nicegui>=2.0.0" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "nicegui-highcharts>=0.2.0" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "vllm>=0.11.0" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "llmcompressor" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "transformers>=4.52.0" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "datasets" "accelerate" "safetensors" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "huggingface_hub" "hf_transfer" "tqdm" \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "pandas" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| apt-get clean && \ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Upgrade pip | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install --upgrade pip | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Install Python dependencies | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "datasets" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "pandas" "huggingface_hub" "hf_transfer" "tqdm" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "accelerate" "safetensors" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "nicegui>=2.0.0" "nicegui-highcharts>=0.2.0" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "vllm>=0.11.0" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+27
to
+30
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
| RUN pip install "nicegui>=2.0.0" "nicegui-highcharts>=0.2.0" | |
| RUN pip install "vllm>=0.11.0" | |
| RUN pip install "nicegui>=2.0.0" "nicegui-highcharts>=0.2.0" | |
| RUN pip install "vllm>=0.11.0" |
Copilot
AI
Nov 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Splitting pip install commands into multiple RUN statements creates additional Docker layers and increases build time. Each RUN command creates a new layer, and splitting dependencies that could be installed together results in redundant pip overhead. Consider grouping related dependencies into fewer RUN commands (e.g., data processing libraries together, UI libraries together) to optimize layer caching while reducing total layers.
| RUN pip install "datasets" | |
| RUN pip install "pandas" "huggingface_hub" "hf_transfer" "tqdm" | |
| RUN pip install "accelerate" "safetensors" | |
| RUN pip install "nicegui>=2.0.0" "nicegui-highcharts>=0.2.0" | |
| RUN pip install "vllm>=0.11.0" | |
| RUN pip install "transformers>=4.52.0" | |
| RUN pip install "llmcompressor" | |
| RUN pip install \ | |
| "datasets" \ | |
| "pandas" \ | |
| "huggingface_hub" \ | |
| "hf_transfer" \ | |
| "tqdm" \ | |
| "accelerate" \ | |
| "safetensors" \ | |
| "nicegui>=2.0.0" \ | |
| "nicegui-highcharts>=0.2.0" \ | |
| "vllm>=0.11.0" \ | |
| "transformers>=4.52.0" \ | |
| "llmcompressor" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove trailing whitespace on line 29.