import{S as bt,i as _t,s as yt,e as i,k as o,w as $,t as f,M as Pt,c as l,d as t,m as p,a as r,x as w,h,b as u,G as n,g as a,y as b,L as xt,q as _,o as y,B as P,v as Et}from"../chunks/vendor-hf-doc-builder.js";import{I as Ie}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ne}from"../chunks/CodeBlock-hf-doc-builder.js";function St(Qe){let m,ae,d,x,O,A,Ae,J,je,ie,c,E,z,j,Ge,K,Ne,le,S,De,G,Me,Ce,re,T,Le,oe,v,k,Q,N,Re,Z,Ue,pe,H,Ye,ue,W,qe,fe,D,he,X,Ve,me,M,de,B,Te,ce,C,ve,F,He,ge,L,$e,R,ee,We,Xe,we,U,be,g,I,te,Y,Be,se,Fe,_e,q,Oe,V,Je,ye;return A=new Ie({}),j=new Ie({}),N=new Ie({}),D=new ne({props:{code:`sudo apt update
sudo apt upgrade
sudo apt install -y xorg-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-dev freeglut3-dev mesa-common-dev xvfb libxinerama1 libxcursor1 mesa-utils
sudo apt-get install xserver-xorg
Now we need to identify which busid your GPU is using:`,highlighted:`sudo apt <span class="hljs-keyword">update</span>
sudo apt upgrade
sudo apt install -y xorg-<span class="hljs-built_in">dev</span> libglu1-mesa libglu1-mesa-<span class="hljs-built_in">dev</span> libgl1-mesa-<span class="hljs-built_in">dev</span> freeglut3-<span class="hljs-built_in">dev</span> mesa-common-<span class="hljs-built_in">dev</span> xvfb libxinerama1 libxcursor1 mesa-utils
sudo apt-<span class="hljs-built_in">get</span> install xserver-xorg
Now we need to identify which busid your GPU is using:`}}),M=new ne({props:{code:`# run this command to find your GPU bus id (for example PCI:0:30:0)
nvidia-xconfig --query-gpu-info
# replace the busid flag with your value
# Note: with headless GPUs (e.g. Tesla T4), which don't have display outputs, remove the --use-display-device=none option
sudo nvidia-xconfig --busid=PCI:0:30:0 --use-display-device=none --virtual=1280x1024`,highlighted:`<span class="hljs-comment"># run this command to find your GPU bus id (for example PCI:0:30:0)</span>
nvidia-xconfig --query-gpu-<span class="hljs-built_in">info</span>
<span class="hljs-comment"># replace the busid flag with your value</span>
<span class="hljs-comment"># <span class="hljs-doctag">Note:</span> with headless GPUs (e.g. Tesla T4), which don&#x27;t have display outputs, remove the --use-display-device=none option</span>
sudo nvidia-xconfig <span class="hljs-attribute">--busid</span>=PCI:0:30:0 <span class="hljs-attribute">--use-display-device</span>=none <span class="hljs-attribute">--virtual</span>=1280x1024`}}),C=new ne({props:{code:"sudo Xorg :0",highlighted:'<span class="hljs-attribute">sudo</span> Xorg :<span class="hljs-number">0</span>'}}),L=new ne({props:{code:`DISPLAY=:0 glxinfo | grep version
DISPLAY=:0 glxgears
nvidia-smi # xorg should show up in the running programs`,highlighted:`DISPLAY=:0 glxinfo | grep version
DISPLAY=:0 glxgears
nvidia-smi <span class="hljs-comment"># xorg should show up in the running programs</span>`}}),U=new ne({props:{code:"export DISPLAY=:0",highlighted:'<span class="hljs-built_in">export</span> <span class="hljs-attribute">DISPLAY</span>=:0'}}),Y=new Ie({}),{c(){m=i("meta"),ae=o(),d=i("h1"),x=i("a"),O=i("span"),$(A.$$.fragment),Ae=o(),J=i("span"),je=f("Running Simulate on GCP"),ie=o(),c=i("h2"),E=i("a"),z=i("span"),$(j.$$.fragment),Ge=o(),K=i("span"),Ne=f("Setting up the VM"),le=o(),S=i("p"),De=f("We recommend using Google\u2019s "),G=i("a"),Me=f("Deep Learning VM"),Ce=f(" to quickly suitable a compatible VM instance."),re=o(),T=i("p"),Le=f("In addition, we recommend attaching a GPU in order to render camera observations and train more quickly. We also recommend setting the vCPU count to be as high as possible."),oe=o(),v=i("h2"),k=i("a"),Q=i("span"),$(N.$$.fragment),Re=o(),Z=i("span"),Ue=f("Installing Dependencies for Headless Rendering"),pe=o(),H=i("p"),Ye=f("In order to perform offscreen rendering, the are a number of additional dependencies to install."),ue=o(),W=i("p"),qe=f("Please run the following:"),fe=o(),$(D.$$.fragment),he=o(),X=i("p"),Ve=f("Now we need to identify which busid your GPU is using and add it to your xorg config file:"),me=o(),$(M.$$.fragment),de=o(),B=i("p"),Te=f("We can now start an X server:"),ce=o(),$(C.$$.fragment),ve=o(),F=i("p"),He=f("Run the following to confirm that offscreen rendering is working."),ge=o(),$(L.$$.fragment),$e=o(),R=i("p"),ee=i("strong"),We=f("Important!"),Xe=f(" The DISPLAY=:0 envirionment variable must be set befire you launch Simulate."),we=o(),$(U.$$.fragment),be=o(),g=i("h2"),I=i("a"),te=i("span"),$(Y.$$.fragment),Be=o(),se=i("span"),Fe=f("Install Simulate"),_e=o(),q=i("p"),Oe=f("Your VM is now set up for headless training. Follow the installation instructions from the "),V=i("a"),Je=f("README"),this.h()},l(e){const s=Pt('[data-svelte="svelte-1phssyn"]',document.head);m=l(s,"META",{name:!0,content:!0}),s.forEach(t),ae=p(e),d=l(e,"H1",{class:!0});var Pe=r(d);x=l(Pe,"A",{id:!0,class:!0,href:!0});var Ze=r(x);O=l(Ze,"SPAN",{});var et=r(O);w(A.$$.fragment,et),et.forEach(t),Ze.forEach(t),Ae=p(Pe),J=l(Pe,"SPAN",{});var tt=r(J);je=h(tt,"Running Simulate on GCP"),tt.forEach(t),Pe.forEach(t),ie=p(e),c=l(e,"H2",{class:!0});var xe=r(c);E=l(xe,"A",{id:!0,class:!0,href:!0});var st=r(E);z=l(st,"SPAN",{});var nt=r(z);w(j.$$.fragment,nt),nt.forEach(t),st.forEach(t),Ge=p(xe),K=l(xe,"SPAN",{});var at=r(K);Ne=h(at,"Setting up the VM"),at.forEach(t),xe.forEach(t),le=p(e),S=l(e,"P",{});var Ee=r(S);De=h(Ee,"We recommend using Google\u2019s "),G=l(Ee,"A",{href:!0,rel:!0});var it=r(G);Me=h(it,"Deep Learning VM"),it.forEach(t),Ce=h(Ee," to quickly suitable a compatible VM instance."),Ee.forEach(t),re=p(e),T=l(e,"P",{});var lt=r(T);Le=h(lt,"In addition, we recommend attaching a GPU in order to render camera observations and train more quickly. We also recommend setting the vCPU count to be as high as possible."),lt.forEach(t),oe=p(e),v=l(e,"H2",{class:!0});var Se=r(v);k=l(Se,"A",{id:!0,class:!0,href:!0});var rt=r(k);Q=l(rt,"SPAN",{});var ot=r(Q);w(N.$$.fragment,ot),ot.forEach(t),rt.forEach(t),Re=p(Se),Z=l(Se,"SPAN",{});var pt=r(Z);Ue=h(pt,"Installing Dependencies for Headless Rendering"),pt.forEach(t),Se.forEach(t),pe=p(e),H=l(e,"P",{});var ut=r(H);Ye=h(ut,"In order to perform offscreen rendering, the are a number of additional dependencies to install."),ut.forEach(t),ue=p(e),W=l(e,"P",{});var ft=r(W);qe=h(ft,"Please run the following:"),ft.forEach(t),fe=p(e),w(D.$$.fragment,e),he=p(e),X=l(e,"P",{});var ht=r(X);Ve=h(ht,"Now we need to identify which busid your GPU is using and add it to your xorg config file:"),ht.forEach(t),me=p(e),w(M.$$.fragment,e),de=p(e),B=l(e,"P",{});var mt=r(B);Te=h(mt,"We can now start an X server:"),mt.forEach(t),ce=p(e),w(C.$$.fragment,e),ve=p(e),F=l(e,"P",{});var dt=r(F);He=h(dt,"Run the following to confirm that offscreen rendering is working."),dt.forEach(t),ge=p(e),w(L.$$.fragment,e),$e=p(e),R=l(e,"P",{});var ze=r(R);ee=l(ze,"STRONG",{});var ct=r(ee);We=h(ct,"Important!"),ct.forEach(t),Xe=h(ze," The DISPLAY=:0 envirionment variable must be set befire you launch Simulate."),ze.forEach(t),we=p(e),w(U.$$.fragment,e),be=p(e),g=l(e,"H2",{class:!0});var ke=r(g);I=l(ke,"A",{id:!0,class:!0,href:!0});var vt=r(I);te=l(vt,"SPAN",{});var gt=r(te);w(Y.$$.fragment,gt),gt.forEach(t),vt.forEach(t),Be=p(ke),se=l(ke,"SPAN",{});var $t=r(se);Fe=h($t,"Install Simulate"),$t.forEach(t),ke.forEach(t),_e=p(e),q=l(e,"P",{});var Ke=r(q);Oe=h(Ke,"Your VM is now set up for headless training. Follow the installation instructions from the "),V=l(Ke,"A",{href:!0,rel:!0});var wt=r(V);Je=h(wt,"README"),wt.forEach(t),Ke.forEach(t),this.h()},h(){u(m,"name","hf:doc:metadata"),u(m,"content",JSON.stringify(kt)),u(x,"id","running-simulate-on-gcp"),u(x,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(x,"href","#running-simulate-on-gcp"),u(d,"class","relative group"),u(E,"id","setting-up-the-vm"),u(E,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(E,"href","#setting-up-the-vm"),u(c,"class","relative group"),u(G,"href","https://cloud.google.com/deep-learning-vm"),u(G,"rel","nofollow"),u(k,"id","installing-dependencies-for-headless-rendering"),u(k,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(k,"href","#installing-dependencies-for-headless-rendering"),u(v,"class","relative group"),u(I,"id","install-simulate"),u(I,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(I,"href","#install-simulate"),u(g,"class","relative group"),u(V,"href","https://github.com/huggingface/simulate#readme"),u(V,"rel","nofollow")},m(e,s){n(document.head,m),a(e,ae,s),a(e,d,s),n(d,x),n(x,O),b(A,O,null),n(d,Ae),n(d,J),n(J,je),a(e,ie,s),a(e,c,s),n(c,E),n(E,z),b(j,z,null),n(c,Ge),n(c,K),n(K,Ne),a(e,le,s),a(e,S,s),n(S,De),n(S,G),n(G,Me),n(S,Ce),a(e,re,s),a(e,T,s),n(T,Le),a(e,oe,s),a(e,v,s),n(v,k),n(k,Q),b(N,Q,null),n(v,Re),n(v,Z),n(Z,Ue),a(e,pe,s),a(e,H,s),n(H,Ye),a(e,ue,s),a(e,W,s),n(W,qe),a(e,fe,s),b(D,e,s),a(e,he,s),a(e,X,s),n(X,Ve),a(e,me,s),b(M,e,s),a(e,de,s),a(e,B,s),n(B,Te),a(e,ce,s),b(C,e,s),a(e,ve,s),a(e,F,s),n(F,He),a(e,ge,s),b(L,e,s),a(e,$e,s),a(e,R,s),n(R,ee),n(ee,We),n(R,Xe),a(e,we,s),b(U,e,s),a(e,be,s),a(e,g,s),n(g,I),n(I,te),b(Y,te,null),n(g,Be),n(g,se),n(se,Fe),a(e,_e,s),a(e,q,s),n(q,Oe),n(q,V),n(V,Je),ye=!0},p:xt,i(e){ye||(_(A.$$.fragment,e),_(j.$$.fragment,e),_(N.$$.fragment,e),_(D.$$.fragment,e),_(M.$$.fragment,e),_(C.$$.fragment,e),_(L.$$.fragment,e),_(U.$$.fragment,e),_(Y.$$.fragment,e),ye=!0)},o(e){y(A.$$.fragment,e),y(j.$$.fragment,e),y(N.$$.fragment,e),y(D.$$.fragment,e),y(M.$$.fragment,e),y(C.$$.fragment,e),y(L.$$.fragment,e),y(U.$$.fragment,e),y(Y.$$.fragment,e),ye=!1},d(e){t(m),e&&t(ae),e&&t(d),P(A),e&&t(ie),e&&t(c),P(j),e&&t(le),e&&t(S),e&&t(re),e&&t(T),e&&t(oe),e&&t(v),P(N),e&&t(pe),e&&t(H),e&&t(ue),e&&t(W),e&&t(fe),P(D,e),e&&t(he),e&&t(X),e&&t(me),P(M,e),e&&t(de),e&&t(B),e&&t(ce),P(C,e),e&&t(ve),e&&t(F),e&&t(ge),P(L,e),e&&t($e),e&&t(R),e&&t(we),P(U,e),e&&t(be),e&&t(g),P(Y),e&&t(_e),e&&t(q)}}}const kt={local:"running-simulate-on-gcp",sections:[{local:"setting-up-the-vm",title:"Setting up the VM"},{local:"installing-dependencies-for-headless-rendering",title:"Installing Dependencies for Headless Rendering"},{local:"install-simulate",title:"Install Simulate"}],title:"Running Simulate on GCP"};function It(Qe){return Et(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Nt extends bt{constructor(m){super();_t(this,m,It,St,yt,{})}}export{Nt as default,kt as metadata};
