Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

#18534 Create .dockerignore

Merged
Glenn Jocher merged 1 commits into Ultralytics:main from ultralytics:dockerignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
  1. // Apply theme colors based on dark/light mode
  2. const applyTheme = (isDark) => {
  3. document.body.setAttribute(
  4. "data-md-color-scheme",
  5. isDark ? "slate" : "default",
  6. );
  7. document.body.setAttribute(
  8. "data-md-color-primary",
  9. isDark ? "black" : "indigo",
  10. );
  11. };
  12. // Check and apply appropriate theme based on system/user preference
  13. const checkTheme = () => {
  14. const palette = JSON.parse(localStorage.getItem(".__palette") || "{}");
  15. if (palette.index === 0) {
  16. // Auto mode is selected
  17. applyTheme(window.matchMedia("(prefers-color-scheme: dark)").matches);
  18. }
  19. };
  20. // Watch for system theme changes
  21. window
  22. .matchMedia("(prefers-color-scheme: dark)")
  23. .addEventListener("change", checkTheme);
  24. // Initialize theme handling on page load
  25. document.addEventListener("DOMContentLoaded", () => {
  26. // Watch for theme toggle changes
  27. document
  28. .getElementById("__palette_1")
  29. ?.addEventListener(
  30. "change",
  31. (e) => e.target.checked && setTimeout(checkTheme),
  32. );
  33. // Initial theme check
  34. checkTheme();
  35. });
  36. // Inkeep --------------------------------------------------------------------------------------------------------------
  37. document.addEventListener("DOMContentLoaded", () => {
  38. const enableSearchBar = true;
  39. const inkeepScript = document.createElement("script");
  40. inkeepScript.src = "https://unpkg.com/@inkeep/uikit-js@0.3.18/dist/embed.js";
  41. inkeepScript.type = "module";
  42. inkeepScript.defer = true;
  43. document.head.appendChild(inkeepScript);
  44. if (enableSearchBar) {
  45. const containerDiv = document.createElement("div");
  46. containerDiv.style.transform = "scale(0.7)";
  47. containerDiv.style.transformOrigin = "left center";
  48. const inkeepDiv = document.createElement("div");
  49. inkeepDiv.id = "inkeepSearchBar";
  50. containerDiv.appendChild(inkeepDiv);
  51. const headerElement = document.querySelector(".md-header__inner");
  52. const searchContainer = headerElement.querySelector(".md-header__source");
  53. if (headerElement && searchContainer) {
  54. headerElement.insertBefore(containerDiv, searchContainer);
  55. }
  56. }
  57. // configure and initialize the widget
  58. const addInkeepWidget = (componentType, targetElementId) => {
  59. const inkeepWidget = Inkeep().embed({
  60. componentType,
  61. ...(componentType !== "ChatButton"
  62. ? { targetElement: targetElementId }
  63. : {}),
  64. colorModeSync: {
  65. observedElement: document.documentElement,
  66. isDarkModeCallback: (el) => {
  67. const currentTheme = el.getAttribute("data-color-mode");
  68. return currentTheme === "dark";
  69. },
  70. colorModeAttribute: "data-color-mode-scheme",
  71. },
  72. properties: {
  73. chatButtonType: "PILL",
  74. fixedPositionXOffset: "1rem",
  75. fixedPositionYOffset: "3rem",
  76. chatButtonBgColor: "#E1FF25",
  77. baseSettings: {
  78. apiKey: "13dfec2e75982bc9bae3199a08e13b86b5fbacd64e9b2f89",
  79. integrationId: "cm1shscmm00y26sj83lgxzvkw",
  80. organizationId: "org_e3869az6hQZ0mXdF",
  81. primaryBrandColor: "#E1FF25",
  82. organizationDisplayName: "Ultralytics",
  83. theme: {
  84. stylesheetUrls: ["/stylesheets/style.css"],
  85. },
  86. },
  87. modalSettings: {
  88. // optional settings
  89. },
  90. searchSettings: {
  91. placeholder: "Search",
  92. },
  93. aiChatSettings: {
  94. chatSubjectName: "Ultralytics",
  95. botAvatarSrcUrl:
  96. "https://storage.googleapis.com/organization-image-assets/ultralytics-botAvatarSrcUrl-1729379860806.svg",
  97. quickQuestions: [
  98. "What's new in Ultralytics YOLO11?",
  99. "How can I get started with Ultralytics HUB?",
  100. "How does Ultralytics Enterprise Licensing work?",
  101. ],
  102. getHelpCallToActions: [
  103. {
  104. name: "Ask on Ultralytics GitHub",
  105. url: "https://github.com/ultralytics/ultralytics",
  106. icon: {
  107. builtIn: "FaGithub",
  108. },
  109. },
  110. {
  111. name: "Ask on Ultralytics Discourse",
  112. url: "https://community.ultralytics.com/",
  113. icon: {
  114. builtIn: "FaDiscourse",
  115. },
  116. },
  117. {
  118. name: "Ask on Ultralytics Discord",
  119. url: "https://discord.com/invite/ultralytics",
  120. icon: {
  121. builtIn: "FaDiscord",
  122. },
  123. },
  124. ],
  125. },
  126. },
  127. });
  128. };
  129. inkeepScript.addEventListener("load", () => {
  130. const widgetContainer = document.getElementById("inkeepSearchBar");
  131. addInkeepWidget("ChatButton");
  132. widgetContainer && addInkeepWidget("SearchBar", "#inkeepSearchBar");
  133. });
  134. });
Discard
Tip!

Press p or to see the previous file or, n or to see the next file