1"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[255],{57014:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>h});var a=n(74848),r=n(28453),s=n(98847),l=n(81386),o=n(79635);const i={sidebar_position:0},c="Docker",u={id:"quick-start/installation/docker",title:"Docker",description:"This guide explains how to launch Tabby using docker.",source:"@site/docs/quick-start/installation/docker.mdx",sourceDirName:"quick-start/installation",slug:"/quick-start/installation/docker",permalink:"/docs/quick-start/installation/docker",draft:!1,unlisted:!1,editUrl:"https://github.com/TabbyML/tabby/edit/main/website/docs/quick-start/installation/docker.mdx",tags:[],version:"current",sidebarPosition:0,frontMatter:{sidebar_position:0},sidebar:"tutorialSidebar",previous:{title:"\ud83d\udc4b What's Tabby",permalink:"/docs/welcome"},next:{title:"Docker Compose",permalink:"/docs/quick-start/installation/docker-compose"}},d={},h=[];function b(e){const t={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.h1,{id:"docker",children:"Docker"}),"\n",(0,a.jsx)(t.p,{children:"This guide explains how to launch Tabby using docker."}),"\n","\n",(0,a.jsxs)(l.A,{children:[(0,a.jsxs)(o.A,{value:"cuda",label:"CUDA",default:!0,children:[(0,a.jsxs)(t.p,{children:["To run Tabby with CUDA support in Docker, please install the ",(0,a.jsx)(t.a,{href:"https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html",children:"NVIDIA Container Toolkit"}),".\nOnce installed, you can launch Tabby using the command below:"]}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",metastring:'title="run.sh"',children:"docker run -d \\\n --name tabby \\\n --gpus all \\\n -p 8080:8080 \\\n -v $HOME/.tabby:/data \\\n registry.tabbyml.com/tabbyml/tabby \\\n serve \\\n --model StarCoder-1B \\\n --chat-model Qwen2-1.5B-Instruct \\\n --device cuda\n"})}),(0,a.jsx)(s.A,{title:"For the systems with SELinux enabled, you may need to add the `:Z` option to the volume mount",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",metastring:'title="run.sh"',children:"docker run -d \\\n --name tabby \\\n --gpus all \\\n -p 8080:8080 \\\n -v $HOME/.tabby:/data:Z \\\n registry.tabbyml.com/tabbyml/tabby \\\n serve \\\n --model StarCoder-1B \\\n --chat-model Qwen2-1.5B-Instruct \\\n --device cuda\n"})})}),(0,a.jsxs)(t.p,{children:["After Tabby is running, you can access it at ",(0,a.jsx)(t.a,{href:"http://localhost:8080",children:"http://localhost:8080"}),"."]}),(0,a.jsx)(t.p,{children:"To view the logs, you can use the following command:"}),(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"docker logs -f tabby\n"})})]}),!1]})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(b,{...e})}):b(e)}},72496:(e,t,n)=>{n.d(t,{A:()=>v});var a=n(96540),r=n(18215),s=n(15066),l=n(63427),o=n(92303),i=n(41422);const c={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};var u=n(74848);function d(e){return!!e&&("SUMMARY"===e.tagName||d(e.parentElement))}function h(e,t){return!!e&&(e===t||h(e.parentElement,t))}function b(e){let{summary:t,children:n,...r}=e;(0,l.A)().collectAnchor(r.id);const b=(0,o.A)(),m=(0,a.useRef)(null),{collapsed:p,setCollapsed:f}=(0,i.u)({initialState:!r.open}),[v,y]=(0,a.useState)(r.open),g=a.isValidElement(t)?t:(0,u.jsx)("summary",{children:t??"Details"});return(0,u.jsxs)("details",{...r,ref:m,open:v,"data-collapsed":p,className:(0,s.A)(c.details,b&&c.isBrowser,r.className),onMouseDown:e=>{d(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;d(t)&&h(t,m.current)&&(e.preventDefault(),p?(f(!1),y(!0)):f(!0))},children:[g,(0,u.jsx)(i.N,{lazy:!1,collapsed:p,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{f(e),y(!e)},children:(0,u.jsx)("div",{className:c.collapsibleContent,children:n})})]})}const m={details:"details_b_Ee"},p="alert alert--info";function f(e){let{...t}=e;return(0,u.jsx)(b,{...t,className:(0,r.A)(p,m.details,t.className)})}function v(e){const t=a.Children.toArray(e.children),n=t.find((e=>a.isValidElement(e)&&"summary"===e.type)),r=(0,u.jsx)(u.Fragment,{children:t.filter((e=>e!==n))});return(0,u.jsx)(f,{...e,summary:n,children:r})}},79635:(e,t,n)=>{n.d(t,{A:()=>l});n(96540);var a=n(18215);const r={tabItem:"tabItem_Ymn6"};var s=n(74848);function l(e){let{children:t,hidden:n,className:l}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,l),hidden:n,children:t})}},81386:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(96540),r=n(18215),s=n(23104),l=n(56347),o=n(205),i=n(57485),c=n(31682),u=n(89466);function d(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs>
1 child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:n}=e;return(0,a.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:n,attributes:a,default:r}}=e;return{value:t,label:n,attributes:a,default:r}}))}(n);return function(e){const t=(0,c.X)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e}),[t,n])}function b(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function m(e){let{queryString:t=!1,groupId:n}=e;const r=(0,l.W6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i.aZ)(s),(0,a.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(r.location.search);t.set(s,e),r.replace({...r.location,search:t.toString()})}),[s,r])]}function p(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,s=h(e),[l,i]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(t){if(!b({value:t,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=n.find((e=>e.default))??n[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s}))),[c,d]=m({queryString:n,groupId:r}),[p,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,s]=(0,u.Dv)(n);return[r,(0,a.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:r}),v=(()=>{const e=c??p;return b({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{v&&i(v)}),[v]);return{selectedValue:l,selectValue:(0,a.useCallback)((e=>{if(!b({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),f(e)}),[d,f,s]),tabValues:s}}var f=n(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=n(74848);function g(e){let{className:t,block:n,selectedValue:a,selectValue:l,tabValues:o}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),u=e=>{const t=e.currentTarget,n=i.indexOf(t),r=o[n].value;r!==a&&(c(t),l(r))},d=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},t),children:o.map((e=>{let{value:t,label:n,attributes:s}=e;return(0,y.jsx)("li",{role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:e=>i.push(e),onKeyDown:d,onClick:u,...s,className:(0,r.A)("tabs__item",v.tabItem,s?.className,{"tabs__item--active":a===t}),children:n??t},t)}))})}function x(e){let{lazy:t,children:n,selectedValue:r}=e;const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===r));return e?(0,a.cloneElement)(e,{className:"margin-top--md"}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:s.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==r})))})}function k(e){const t=p(e);return(0,y.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),
1children:[(0,y.jsx)(g,{...e,...t}),(0,y.jsx)(x,{...e,...t})]})}function j(e){const t=(0,f.A)();return(0,y.jsx)(k,{...e,children:d(e.children)},String(t))}},98847:(e,t,n)=>{n.d(t,{A:()=>s});n(96540);var a=n(72496),r=n(74848);function s(e){const{children:t,title:n="Collapse"}=e;return(0,r.jsxs)(a.A,{children:[(0,r.jsx)("summary",{mdxType:"summary",children:n}),t]})}},28453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>o});var a=n(96540);const r={},s=a.createContext(r);function l(e){const t=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),a.createElement(s.Provider,{value:t},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.