import{S as xt,i as Et,s as St,e as i,k as o,w,t as f,M as kt,c as l,d as t,m as p,a as r,x as b,h,b as u,G as s,g as a,y as _,L as It,q as y,o as P,B as x,v as At}from"../../chunks/vendor-hf-doc-builder.js";import{I as je}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{C as ie}from"../../chunks/CodeBlock-hf-doc-builder.js";function jt(tt){let m,le,d,E,F,j,Ge,J,De,re,c,S,z,G,Ne,K,Ce,oe,k,Me,D,Le,Re,pe,T,Ue,ue,v,I,Q,N,Ye,Z,qe,fe,H,Ve,he,W,Te,me,C,de,X,He,ce,M,ve,O,We,ge,L,$e,B,Xe,we,R,be,g,ee,Oe,Be,te,Fe,Je,_e,U,ye,$,A,se,Y,ze,ne,Ke,Pe,q,Qe,V,Ze,xe;return j=new je({}),G=new je({}),N=new je({}),C=new ie({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 ie({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`}}),L=new ie({props:{code:"sudo Xorg :0",highlighted:'<span class="hljs-attribute">sudo</span> Xorg :<span class="hljs-number">0</span>'}}),R=new ie({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 ie({props:{code:"export DISPLAY=:0",highlighted:'<span class="hljs-built_in">export</span> <span class="hljs-attribute">DISPLAY</span>=:0'}}),Y=new je({}),{c(){m=i("meta"),le=o(),d=i("h1"),E=i("a"),F=i("span"),w(j.$$.fragment),Ge=o(),J=i("span"),De=f("Running Simulate on GCP"),re=o(),c=i("h2"),S=i("a"),z=i("span"),w(G.$$.fragment),Ne=o(),K=i("span"),Ce=f("Setting up the VM"),oe=o(),k=i("p"),Me=f("We recommend using Google\u2019s "),D=i("a"),Le=f("Deep Learning VM"),Re=f(" to quickly suitable a compatible VM instance."),pe=o(),T=i("p"),Ue=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."),ue=o(),v=i("h2"),I=i("a"),Q=i("span"),w(N.$$.fragment),Ye=o(),Z=i("span"),qe=f("Installing Dependencies for Headless Rendering"),fe=o(),H=i("p"),Ve=f("In order to perform offscreen rendering, there are a number of additional dependencies to install."),he=o(),W=i("p"),Te=f("Please run the following:"),me=o(),w(C.$$.fragment),de=o(),X=i("p"),He=f("Now we need to identify which build your GPU is using and add it to your xorg config file:"),ce=o(),w(M.$$.fragment),ve=o(),O=i("p"),We=f("We can now start an X server:"),ge=o(),w(L.$$.fragment),$e=o(),B=i("p"),Xe=f("Run the following to confirm that offscreen rendering is working."),we=o(),w(R.$$.fragment),be=o(),g=i("p"),ee=i("strong"),Oe=f("Important!"),Be=f(" The "),te=i("code"),Fe=f("DISPLAY=:0"),Je=f(" environment variable must be set before you launch Simulate."),_e=o(),w(U.$$.fragment),ye=o(),$=i("h2"),A=i("a"),se=i("span"),w(Y.$$.fragment),ze=o(),ne=i("span"),Ke=f("Install Simulate"),Pe=o(),q=i("p"),Qe=f("Your VM is now set up for headless training. Follow the installation instructions from the "),V=i("a"),Ze=f("README"),this.h()},l(e){const n=kt('[data-svelte="svelte-1phssyn"]',document.head);m=l(n,"META",{name:!0,content:!0}),n.forEach(t),le=p(e),d=l(e,"H1",{class:!0});var Ee=r(d);E=l(Ee,"A",{id:!0,class:!0,href:!0});var st=r(E);F=l(st,"SPAN",{});var nt=r(F);b(j.$$.fragment,nt),nt.forEach(t),st.forEach(t),Ge=p(Ee),J=l(Ee,"SPAN",{});var at=r(J);De=h(at,"Running Simulate on GCP"),at.forEach(t),Ee.forEach(t),re=p(e),c=l(e,"H2",{class:!0});var Se=r(c);S=l(Se,"A",{id:!0,class:!0,href:!0});var it=r(S);z=l(it,"SPAN",{});var lt=r(z);b(G.$$.fragment,lt),lt.forEach(t),it.forEach(t),Ne=p(Se),K=l(Se,"SPAN",{});var rt=r(K);Ce=h(rt,"Setting up the VM"),rt.forEach(t),Se.forEach(t),oe=p(e),k=l(e,"P",{});var ke=r(k);Me=h(ke,"We recommend using Google\u2019s "),D=l(ke,"A",{href:!0,rel:!0});var ot=r(D);Le=h(ot,"Deep Learning VM"),ot.forEach(t),Re=h(ke," to quickly suitable a compatible VM instance."),ke.forEach(t),pe=p(e),T=l(e,"P",{});var pt=r(T);Ue=h(pt,"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."),pt.forEach(t),ue=p(e),v=l(e,"H2",{class:!0});var Ie=r(v);I=l(Ie,"A",{id:!0,class:!0,href:!0});var ut=r(I);Q=l(ut,"SPAN",{});var ft=r(Q);b(N.$$.fragment,ft),ft.forEach(t),ut.forEach(t),Ye=p(Ie),Z=l(Ie,"SPAN",{});var ht=r(Z);qe=h(ht,"Installing Dependencies for Headless Rendering"),ht.forEach(t),Ie.forEach(t),fe=p(e),H=l(e,"P",{});var mt=r(H);Ve=h(mt,"In order to perform offscreen rendering, there are a number of additional dependencies to install."),mt.forEach(t),he=p(e),W=l(e,"P",{});var dt=r(W);Te=h(dt,"Please run the following:"),dt.forEach(t),me=p(e),b(C.$$.fragment,e),de=p(e),X=l(e,"P",{});var ct=r(X);He=h(ct,"Now we need to identify which build your GPU is using and add it to your xorg config file:"),ct.forEach(t),ce=p(e),b(M.$$.fragment,e),ve=p(e),O=l(e,"P",{});var vt=r(O);We=h(vt,"We can now start an X server:"),vt.forEach(t),ge=p(e),b(L.$$.fragment,e),$e=p(e),B=l(e,"P",{});var gt=r(B);Xe=h(gt,"Run the following to confirm that offscreen rendering is working."),gt.forEach(t),we=p(e),b(R.$$.fragment,e),be=p(e),g=l(e,"P",{});var ae=r(g);ee=l(ae,"STRONG",{});var $t=r(ee);Oe=h($t,"Important!"),$t.forEach(t),Be=h(ae," The "),te=l(ae,"CODE",{});var wt=r(te);Fe=h(wt,"DISPLAY=:0"),wt.forEach(t),Je=h(ae," environment variable must be set before you launch Simulate."),ae.forEach(t),_e=p(e),b(U.$$.fragment,e),ye=p(e),$=l(e,"H2",{class:!0});var Ae=r($);A=l(Ae,"A",{id:!0,class:!0,href:!0});var bt=r(A);se=l(bt,"SPAN",{});var _t=r(se);b(Y.$$.fragment,_t),_t.forEach(t),bt.forEach(t),ze=p(Ae),ne=l(Ae,"SPAN",{});var yt=r(ne);Ke=h(yt,"Install Simulate"),yt.forEach(t),Ae.forEach(t),Pe=p(e),q=l(e,"P",{});var et=r(q);Qe=h(et,"Your VM is now set up for headless training. Follow the installation instructions from the "),V=l(et,"A",{href:!0,rel:!0});var Pt=r(V);Ze=h(Pt,"README"),Pt.forEach(t),et.forEach(t),this.h()},h(){u(m,"name","hf:doc:metadata"),u(m,"content",JSON.stringify(Gt)),u(E,"id","running-simulate-on-gcp"),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","#running-simulate-on-gcp"),u(d,"class","relative group"),u(S,"id","setting-up-the-vm"),u(S,"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(S,"href","#setting-up-the-vm"),u(c,"class","relative group"),u(D,"href","https://cloud.google.com/deep-learning-vm"),u(D,"rel","nofollow"),u(I,"id","installing-dependencies-for-headless-rendering"),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","#installing-dependencies-for-headless-rendering"),u(v,"class","relative group"),u(A,"id","install-simulate"),u(A,"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(A,"href","#install-simulate"),u($,"class","relative group"),u(V,"href","https://github.com/huggingface/simulate#readme"),u(V,"rel","nofollow")},m(e,n){s(document.head,m),a(e,le,n),a(e,d,n),s(d,E),s(E,F),_(j,F,null),s(d,Ge),s(d,J),s(J,De),a(e,re,n),a(e,c,n),s(c,S),s(S,z),_(G,z,null),s(c,Ne),s(c,K),s(K,Ce),a(e,oe,n),a(e,k,n),s(k,Me),s(k,D),s(D,Le),s(k,Re),a(e,pe,n),a(e,T,n),s(T,Ue),a(e,ue,n),a(e,v,n),s(v,I),s(I,Q),_(N,Q,null),s(v,Ye),s(v,Z),s(Z,qe),a(e,fe,n),a(e,H,n),s(H,Ve),a(e,he,n),a(e,W,n),s(W,Te),a(e,me,n),_(C,e,n),a(e,de,n),a(e,X,n),s(X,He),a(e,ce,n),_(M,e,n),a(e,ve,n),a(e,O,n),s(O,We),a(e,ge,n),_(L,e,n),a(e,$e,n),a(e,B,n),s(B,Xe),a(e,we,n),_(R,e,n),a(e,be,n),a(e,g,n),s(g,ee),s(ee,Oe),s(g,Be),s(g,te),s(te,Fe),s(g,Je),a(e,_e,n),_(U,e,n),a(e,ye,n),a(e,$,n),s($,A),s(A,se),_(Y,se,null),s($,ze),s($,ne),s(ne,Ke),a(e,Pe,n),a(e,q,n),s(q,Qe),s(q,V),s(V,Ze),xe=!0},p:It,i(e){xe||(y(j.$$.fragment,e),y(G.$$.fragment,e),y(N.$$.fragment,e),y(C.$$.fragment,e),y(M.$$.fragment,e),y(L.$$.fragment,e),y(R.$$.fragment,e),y(U.$$.fragment,e),y(Y.$$.fragment,e),xe=!0)},o(e){P(j.$$.fragment,e),P(G.$$.fragment,e),P(N.$$.fragment,e),P(C.$$.fragment,e),P(M.$$.fragment,e),P(L.$$.fragment,e),P(R.$$.fragment,e),P(U.$$.fragment,e),P(Y.$$.fragment,e),xe=!1},d(e){t(m),e&&t(le),e&&t(d),x(j),e&&t(re),e&&t(c),x(G),e&&t(oe),e&&t(k),e&&t(pe),e&&t(T),e&&t(ue),e&&t(v),x(N),e&&t(fe),e&&t(H),e&&t(he),e&&t(W),e&&t(me),x(C,e),e&&t(de),e&&t(X),e&&t(ce),x(M,e),e&&t(ve),e&&t(O),e&&t(ge),x(L,e),e&&t($e),e&&t(B),e&&t(we),x(R,e),e&&t(be),e&&t(g),e&&t(_e),x(U,e),e&&t(ye),e&&t($),x(Y),e&&t(Pe),e&&t(q)}}}const Gt={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 Dt(tt){return At(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Lt extends xt{constructor(m){super();Et(this,m,Dt,jt,St,{})}}export{Lt as default,Gt as metadata};
