Skip to content

fix: correct venv installation path in dockerfile - #1181

Merged
moshemorad merged 2 commits into
masterfrom
mainred/fix-venv-path
Dec 14, 2025
Merged

moshemorad merged 2 commits into
masterfrom
mainred/fix-venv-path

Conversation

@mainred

@mainred mainred commented Dec 10, 2025

Copy link
Copy Markdown
Collaborator

In build stage of dockerfile, the virtual venv is installed under /app, since poetry installs python executables like poetry with the interpreter "/app/venv/bin/python", but we copied venv from builder to /venv in the docker image, leading to the failure of executing the python tool: bash: /venv/bin/poetry: cannot execute: required file not found

cat /venv/bin/poetry
#!/app/venv/bin/python
import sys
from poetry.console.application import main
if __name__ == '__main__':
    if sys.argv[0].endswith('.exe'):
        sys.argv[0] = sys.argv[0][:-4]
    sys.exit(main())

To make /app folder clean with only holmes related files, I keep the venv under /, so the change is mainly under builder by changing the workdir to /

Tests

  • run poetry
root@43f694155286:/app# poetry --version
Poetry (version 2.2.1)
  • run holmes cli.py
root@43f694155286:/app# python holmes_cli.py ask "what's cluster info" --model azure/gpt-4.1
Loaded models: ['azure/gpt-4.1']
Refreshing available datasources (toolsets)
Running without kube-config! e=Invalid kube-config file. No configuration found.
......
Toolset statuses are cached to /root/.holmes/toolsets_status.json
✅ Toolset kubernetes/kube-prometheus-stack
✅ Toolset core_investigation
✅ Toolset internet
✅ Toolset datadog/rds
✅ Toolset bash
✅ Toolset runbook
✅ Toolset kubernetes/logs
✅ Toolset kubernetes/core
✅ Toolset helm/core
Using selected model: azure/gpt-4.1
Using model: azure/gpt-4.1 (1,047,576 total tokens, 32,768 output tokens)
Welcome to HolmesGPT: Type '/exit' to exit, '/help' for commands.
User: what's cluster info

Thinking...

The AI requested 1 tool call(s).
Running tool #1 TodoWrite: Update investigation tasks
Task List:
+----+--------------------------------------------------------+-----------------+
| ID | Content                                                | Status          |
+----+--------------------------------------------------------+-----------------+
| 1  | Define what 'cluster info' means in Kubernetes context | [~] in_progress |
| 2  | List what is typically included in cluster info output | [ ] pending     |
| 3  | Verify answer completeness and accuracy                | [ ] pending     |
+----+--------------------------------------------------------+-----------------+
  Finished #1 in 0.00s, output length: 518 characters (11 lines) - /show 1 to view contents

@mainred
mainred force-pushed the mainred/fix-venv-path branch from 5f393da to 42d598a Compare December 10, 2025 15:29
Signed-off-by: Qingchuan Hao <qingchuan.hao@microsoft.com>
@mainred
mainred force-pushed the mainred/fix-venv-path branch from 42d598a to d34bd2b Compare December 10, 2025 15:29
@mainred

mainred commented Dec 10, 2025

Copy link
Copy Markdown
Collaborator Author

The background is we are delivering containerized holmes CLI, and we want to run evals in the pod with poetry command.

@mainred mainred changed the title fix venv installation path fix: correct venv installation path in dockerfile Dec 10, 2025
@mainred
mainred requested a review from moshemorad December 11, 2025 00:15

@arikalon1 arikalon1 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!

@github-actions

Copy link
Copy Markdown
Contributor

Results of HolmesGPT evals

  • ask_holmes: 33/37 test cases were successful, 3 regressions, 1 setup failures
Test suite Test case Status
ask 01_how_many_pods ❌
ask 02_what_is_wrong_with_pod ✅
ask 04_related_k8s_events ✅
ask 05_image_version ✅
ask 09_crashpod ✅
ask 10_image_pull_backoff ✅
ask 110_k8s_events_image_pull ✅
ask 11_init_containers ✅
ask 13a_pending_node_selector_basic ✅
ask 14_pending_resources ✅
ask 15_failed_readiness_probe ✅
ask 163_compaction_follow_up ✅
ask 17_oom_kill ✅
ask 18_oom_kill_from_issues_history ✅
ask 19_detect_missing_app_details ✅
ask 20_long_log_file_search ❌
ask 24_misconfigured_pvc ✅
ask 24a_misconfigured_pvc_basic ✅
ask 28_permissions_error 🚧
ask 39_failed_toolset ❌
ask 41_setup_argo ✅
ask 42_dns_issues_steps_new_tools ✅
ask 43_current_datetime_from_prompt ✅
ask 45_fetch_deployment_logs_simple ✅
ask 51_logs_summarize_errors ✅
ask 53_logs_find_term ✅
ask 54_not_truncated_when_getting_pods ✅
ask 59_label_based_counting ✅
ask 60_count_less_than ✅
ask 61_exact_match_counting ✅
ask 63_fetch_error_logs_no_errors ✅
ask 79_configmap_mount_issue ✅
ask 83_secret_not_found ✅
ask 86_configmap_like_but_secret ✅
ask 93_calling_datadog[0] ✅
ask 93_calling_datadog[1] ✅
ask 93_calling_datadog[2] ✅

Legend

  • ✅ the test was successful
  • :minus: the test was skipped
  • ⚠️ the test failed but is known to be flaky or known to fail
  • 🚧 the test had a setup failure (not a code regression)
  • 🔧 the test failed due to mock data issues (not a code regression)
  • 🚫 the test was throttled by API rate limits/overload
  • ❌ the test failed and should be fixed before merging the PR

@moshemorad
moshemorad merged commit 2cf81e7 into master Dec 14, 2025
7 of 10 checks passed
@moshemorad
moshemorad deleted the mainred/fix-venv-path branch December 14, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants