import{s as $t,o as vt,n as bt}from"../chunks/scheduler.d6170356.js";import{S as Lt,i as Mt,g as r,s as a,r as m,A as xt,h as u,f as n,c as i,j as wt,u as g,x as c,k as Ve,y as Ct,a as o,v as d,d as y,t as w,w as $,m as Ae,n as Ne}from"../chunks/index.fcd4cc08.js";import{T as Oe}from"../chunks/Tip.b09c67cf.js";import{C as _t}from"../chunks/CodeBlock.7b16bdef.js";import{H as ae,E as Tt}from"../chunks/EditOnGithub.da2b595c.js";function kt(v){let l;return{c(){l=Ae(`Your Space's URL will only be available and usable for connecting from your
local machine if the visibility of the space is set to 'Public'.`)},l(s){l=Ne(s,`Your Space's URL will only be available and usable for connecting from your
local machine if the visibility of the space is set to 'Public'.`)},m(s,f){o(s,l,f)},d(s){s&&n(l)}}}function St(v){let l;return{c(){l=Ae(`The ZenML dashboard will currently not work when viewed from within the Huggingface 
webpage (i.e. wrapped in the main \`https://huggingface.co/...\` website). This is on 
account of a limitation in how cookies are handled between ZenML and Huggingface. 
You **must** view the dashboard from the 'Direct URL' (see above).`)},l(s){l=Ne(s,`The ZenML dashboard will currently not work when viewed from within the Huggingface 
webpage (i.e. wrapped in the main \`https://huggingface.co/...\` website). This is on 
account of a limitation in how cookies are handled between ZenML and Huggingface. 
You **must** view the dashboard from the 'Direct URL' (see above).`)},m(s,f){o(s,l,f)},d(s){s&&n(l)}}}function Ht(v){let l;return{c(){l=Ae(`If you are using the space just for testing and experimentation, you don't need
to make any changes to the configuration. Everything will work out of the box.`)},l(s){l=Ne(s,`If you are using the space just for testing and experimentation, you don't need
to make any changes to the configuration. Everything will work out of the box.`)},m(s,f){o(s,l,f)},d(s){s&&n(l)}}}function Zt(v){let l,s,f=`<li>change your password on the <code>default</code> account that you get when you start. You
can do this from the Dashboard or via the CLI.</li> <li>create a new user account with a password and assign it the <code>admin</code> role. This
can also be done from the Dashboard (by ‘inviting’ a new user) or via the CLI.</li> <li>reconnect to the server using the new user account and password as described
above, and use this new user account as your working account.</li>`,b,h,T=`This is because the default user created by the
HuggingFace Spaces deployment process has no password assigned to it and as the
Space is publicly accessible (since the Space is public) <em>potentially anyone
could access your secrets without this extra step</em>. To change your password
navigate to the Settings page by clicking the button in the upper right hand
corner of the Dashboard and then click ‘Update Password’.`;return{c(){l=Ae(`If you wish to use a cloud secrets backend together with ZenML for secrets
management, **you must take the following minimal security precautions** on your ZenML Server on the
Dashboard:
`),s=r("ul"),s.innerHTML=f,b=a(),h=r("p"),h.innerHTML=T},l(p){l=Ne(p,`If you wish to use a cloud secrets backend together with ZenML for secrets
management, **you must take the following minimal security precautions** on your ZenML Server on the
Dashboard:
`),s=u(p,"UL",{"data-svelte-h":!0}),c(s)!=="svelte-1a8gw2p"&&(s.innerHTML=f),b=i(p),h=u(p,"P",{"data-svelte-h":!0}),c(h)!=="svelte-oa1oej"&&(h.innerHTML=T)},m(p,k){o(p,l,k),o(p,s,k),o(p,b,k),o(p,h,k)},p:bt,d(p){p&&(n(l),n(s),n(b),n(h))}}}function zt(v){let l,s,f,b,h,T,p,k='<a href="https://github.com/zenml-io/zenml" rel="nofollow">ZenML</a> is an extensible, open-source MLOps framework for creating portable, production-ready MLOps pipelines. It’s built for Data Scientists, ML Engineers, and MLOps Developers to collaborate as they develop to production.',se,S,qe=`ZenML offers a simple and flexible syntax, is cloud- and tool-agnostic, and has
interfaces/abstractions catered toward ML workflows. With ZenML you’ll have all
your favorite tools in one place, so you can tailor a workflow that caters to
your specific needs.`,le,H,We=`The ZenML Huggingface Space allows you to get up and running with a deployed version
of ZenML with just a few clicks. Within a few minutes, you’ll have this default
ZenML dashboard deployed and ready for you to connect to from your local
machine.`,re,Z,Je=`In the sections that follow, you’ll learn to deploy your own instance of ZenML and use
it to view and manage your machine learning pipelines right from the Hub. ZenML
on Huggingface Spaces is a <strong>self-contained application completely hosted on the
Hub using Docker</strong>. The diagram below illustrates the complete process.`,ue,z,Be='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/zenml/hf_spaces_chart.png" alt="ZenML on HuggingFace Spaces -- default deployment"/>',ce,P,Qe=`Visit <a href="https://docs.zenml.io/" rel="nofollow">the ZenML documentation</a> to learn more about its
features and how to get started with running your machine learning pipelines
through your Huggingface Spaces deployment. You can check out <a href="https://github.com/zenml-io/zenml/tree/main/examples" rel="nofollow">some small sample
examples</a> of ZenML pipelines to get started or take your pick of some more
complex production-grade projects at <a href="https://github.com/zenml-io/zenml-projects" rel="nofollow">the ZenML Projects
repository</a>. ZenML integrates with
many of your favorite tools out of the box, <a href="https://zenml.io/integrations/huggingface" rel="nofollow">including
Huggingface</a> of course! If there’s
something else you want to use, we’re built to be extensible and you can easily
make it work with whatever your custom tool or workflow is.`,pe,U,he,R,Xe="You can deploy ZenML on Spaces with just a few clicks:",fe,L,Ge='<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg"/>',me,D,Ke=`To set up your ZenML app, you need to specify three main components: the Owner
(either your personal account or an organization), a Space name, and the
Visibility (a bit lower down the page). Note that the space visibility needs to
be set to ‘Public’ if you wish to connect to the ZenML server from your local
machine.`,ge,E,et='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/zenml/choose_space.png" alt="Choose the ZenML Docker template"/>',de,I,tt=`You have the option here to select a higher tier machine to use for your server.
The advantage of selecting a paid CPU instance is that it is not subject to
auto-shutdown policies and thus will stay up as long as you leave it up. In
order to make use of a persistent CPU, you’ll likely want to create and set up a
MySQL database to connect to (see below).`,ye,F,nt=`To personalize your Space’s appearance, such as the title, emojis, and colors,
navigate to “Files and Versions” and modify the metadata in your README.md file.
Full information on Spaces configuration parameters can be found on the
HuggingFace <a href="https://huggingface.co/docs/hub/spaces-config-reference" rel="nofollow">documentation reference guide</a>.`,we,Y,ot=`After creating your Space, you’ll notice a ‘Building’ status along with logs
displayed on the screen. When this switches to ‘Running’, your Space is ready for use. If the
ZenML login UI isn’t visible, try refreshing the page.`,$e,j,at=`In the upper-right hand corner of your space you’ll see a button with three dots
which, when you click on it, will offer you a menu option to “Embed this Space”.
(See <a href="https://huggingface.co/docs/hub/spaces-embed" rel="nofollow">the HuggingFace
documentation</a> for more details on
this feature.) Copy the “Direct URL” shown in the box that you can now see on
the screen. This should look something like this:
<code>https://&lt;YOUR_USERNAME&gt;-&lt;SPACE_NAME&gt;.hf.space</code>. Open that URL and use our default
login to access the dashboard (username: ‘default’, password: (leave it empty)).`,ve,O,be,A,it=`Once you have your ZenML server up and running, you can connect to it from your
local machine. To do this, you’ll need to get your Space’s ‘Direct URL’ (see above).`,Le,M,Me,N,st=`You can use the ‘Direct URL’ to connect to your ZenML server from your local machine
with the following CLI command (after installing ZenML, and using your custom
URL instead of the placeholder):`,xe,V,Ce,q,lt=`You can also use the Direct URL in your browser to use the ZenML dashboard as a
fullscreen application (i.e. without the HuggingFace Spaces wrapper around it).`,_e,x,Te,W,ke,J,rt=`By default the ZenML application will be configured to use a SQLite
non-persistent database. If you want to use a persistent database, you can
configure this by amending the <code>Dockerfile</code> in your Space’s root directory. For
full details on the various parameters you can change, see <a href="https://docs.zenml.io/getting-started/deploying-zenml/docker#zenml-server-configuration-options" rel="nofollow">our reference
documentation</a> on configuring
ZenML when deployed with Docker.`,Se,C,He,B,ut=`You can also use an external secrets backend together with your HuggingFace
Spaces as described in <a href="https://docs.zenml.io/getting-started/deploying-zenml/docker#zenml-server-configuration-options" rel="nofollow">our
documentation</a>. You should be
sure to use HuggingFace’s inbuilt ‘Repository secrets’ functionality to
configure any secrets you need to use in your<code>Dockerfile</code> configuration. <a href="https://huggingface.co/docs/hub/spaces-sdks-docker#secret-management" rel="nofollow">See the
documentation</a>
for more details how to set this up.`,Ze,_,ze,Q,Pe,X,ct=`The default space will use the latest version of ZenML automatically. If you
want to update your version, you can simply select the ‘Factory reboot’ option
within the ‘Settings’ tab of the space. Note that this will wipe any data
contained within the space and so if you are not using a MySQL persistent
database (as described above) you will lose any data contained within your ZenML
deployment on the space. You can also configure the space to use an earlier
version by updating the <code>Dockerfile</code>’s <code>FROM</code> import statement at the very top.`,Ue,G,Re,K,pt=`As a next step, check out our <a href="https://docs.zenml.io/starter-guide/pipelines" rel="nofollow">Starter Guide to MLOps with
ZenML</a> which is a series of short
practical pages on how to get going quickly. Alternatively, check out <a href="https://github.com/zenml-io/zenml/tree/main/examples/quickstart" rel="nofollow">our
<code>quickstart</code>
example</a> which
is a full end-to-end example of many of the features of ZenML.`,De,ee,Ee,te,ht=`If you are having trouble with your ZenML server on HuggingFace Spaces, you can
view the logs by clicking on the “Open Logs” button at the top of the space.
This will give you more context of what’s happening with your server.`,Ie,ne,ft=`If you have suggestions or need specific support for anything else which isn’t
working, please <a href="https://zenml.io/slack-invite/" rel="nofollow">join the ZenML Slack community</a>
and we’ll be happy to help you out!`,Fe,oe,Ye,ie,je;return h=new ae({props:{title:"ZenML on Spaces",local:"zenml-on-spaces",headingTag:"h1"}}),U=new ae({props:{title:"⚡️ Deploy ZenML on Spaces",local:"-deploy-zenml-on-spaces",headingTag:"h2"}}),O=new ae({props:{title:"Connecting to your ZenML Server from your Local Machine",local:"connecting-to-your-zenml-server-from-your-local-machine",headingTag:"h2"}}),M=new Oe({props:{warning:!0,$$slots:{default:[kt]},$$scope:{ctx:v}}}),V=new _t({props:{code:"emVubWwlMjBjb25uZWN0JTIwLS11cmwlMjAnJTNDWU9VUl9IRl9TUEFDRVNfRElSRUNUX1VSTCUzRSclMjAtLXVzZXJuYW1lJTNEJ2RlZmF1bHQnJTIwLS1wYXNzd29yZCUzRCcn",highlighted:"zenml connect --url &#x27;&lt;YOUR_HF_SPACES_DIRECT_URL&gt;&#x27; --username=&#x27;default&#x27; --password=&#x27;&#x27;",wrap:!1}}),x=new Oe({props:{warning:!0,$$slots:{default:[St]},$$scope:{ctx:v}}}),W=new ae({props:{title:"Extra Configuration Options",local:"extra-configuration-options",headingTag:"h2"}}),C=new Oe({props:{$$slots:{default:[Ht]},$$scope:{ctx:v}}}),_=new Oe({props:{warning:!0,$$slots:{default:[Zt]},$$scope:{ctx:v}}}),Q=new ae({props:{title:"Upgrading your ZenML Server on HF Spaces",local:"upgrading-your-zenml-server-on-hf-spaces",headingTag:"h2"}}),G=new ae({props:{title:"Next Steps",local:"next-steps",headingTag:"h2"}}),ee=new ae({props:{title:"🤗 Feedback and support",local:"-feedback-and-support",headingTag:"h2"}}),oe=new Tt({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/spaces-sdks-docker-zenml.md"}}),{c(){l=r("meta"),s=a(),f=r("p"),b=a(),m(h.$$.fragment),T=a(),p=r("p"),p.innerHTML=k,se=a(),S=r("p"),S.textContent=qe,le=a(),H=r("p"),H.textContent=We,re=a(),Z=r("p"),Z.innerHTML=Je,ue=a(),z=r("p"),z.innerHTML=Be,ce=a(),P=r("p"),P.innerHTML=Qe,pe=a(),m(U.$$.fragment),he=a(),R=r("p"),R.textContent=Xe,fe=a(),L=r("a"),L.innerHTML=Ge,me=a(),D=r("p"),D.textContent=Ke,ge=a(),E=r("p"),E.innerHTML=et,de=a(),I=r("p"),I.textContent=tt,ye=a(),F=r("p"),F.innerHTML=nt,we=a(),Y=r("p"),Y.textContent=ot,$e=a(),j=r("p"),j.innerHTML=at,ve=a(),m(O.$$.fragment),be=a(),A=r("p"),A.textContent=it,Le=a(),m(M.$$.fragment),Me=a(),N=r("p"),N.textContent=st,xe=a(),m(V.$$.fragment),Ce=a(),q=r("p"),q.textContent=lt,_e=a(),m(x.$$.fragment),Te=a(),m(W.$$.fragment),ke=a(),J=r("p"),J.innerHTML=rt,Se=a(),m(C.$$.fragment),He=a(),B=r("p"),B.innerHTML=ut,Ze=a(),m(_.$$.fragment),ze=a(),m(Q.$$.fragment),Pe=a(),X=r("p"),X.innerHTML=ct,Ue=a(),m(G.$$.fragment),Re=a(),K=r("p"),K.innerHTML=pt,De=a(),m(ee.$$.fragment),Ee=a(),te=r("p"),te.textContent=ht,Ie=a(),ne=r("p"),ne.innerHTML=ft,Fe=a(),m(oe.$$.fragment),Ye=a(),ie=r("p"),this.h()},l(e){const t=xt("svelte-u9bgzb",document.head);l=u(t,"META",{name:!0,content:!0}),t.forEach(n),s=i(e),f=u(e,"P",{}),wt(f).forEach(n),b=i(e),g(h.$$.fragment,e),T=i(e),p=u(e,"P",{"data-svelte-h":!0}),c(p)!=="svelte-se4hh5"&&(p.innerHTML=k),se=i(e),S=u(e,"P",{"data-svelte-h":!0}),c(S)!=="svelte-4e0nrh"&&(S.textContent=qe),le=i(e),H=u(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-6eb5e1"&&(H.textContent=We),re=i(e),Z=u(e,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-v0nlhn"&&(Z.innerHTML=Je),ue=i(e),z=u(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-cr30gl"&&(z.innerHTML=Be),ce=i(e),P=u(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-10w1dv6"&&(P.innerHTML=Qe),pe=i(e),g(U.$$.fragment,e),he=i(e),R=u(e,"P",{"data-svelte-h":!0}),c(R)!=="svelte-1ppvb5a"&&(R.textContent=Xe),fe=i(e),L=u(e,"A",{href:!0,"data-svelte-h":!0}),c(L)!=="svelte-h8yqkc"&&(L.innerHTML=Ge),me=i(e),D=u(e,"P",{"data-svelte-h":!0}),c(D)!=="svelte-mdxpkf"&&(D.textContent=Ke),ge=i(e),E=u(e,"P",{"data-svelte-h":!0}),c(E)!=="svelte-1a42vw4"&&(E.innerHTML=et),de=i(e),I=u(e,"P",{"data-svelte-h":!0}),c(I)!=="svelte-6fl4l6"&&(I.textContent=tt),ye=i(e),F=u(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-1trbth0"&&(F.innerHTML=nt),we=i(e),Y=u(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-b8aggg"&&(Y.textContent=ot),$e=i(e),j=u(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-3b2pb6"&&(j.innerHTML=at),ve=i(e),g(O.$$.fragment,e),be=i(e),A=u(e,"P",{"data-svelte-h":!0}),c(A)!=="svelte-nzvood"&&(A.textContent=it),Le=i(e),g(M.$$.fragment,e),Me=i(e),N=u(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-ds5pw1"&&(N.textContent=st),xe=i(e),g(V.$$.fragment,e),Ce=i(e),q=u(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-pwyhtz"&&(q.textContent=lt),_e=i(e),g(x.$$.fragment,e),Te=i(e),g(W.$$.fragment,e),ke=i(e),J=u(e,"P",{"data-svelte-h":!0}),c(J)!=="svelte-1qvsz0l"&&(J.innerHTML=rt),Se=i(e),g(C.$$.fragment,e),He=i(e),B=u(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-cas8ql"&&(B.innerHTML=ut),Ze=i(e),g(_.$$.fragment,e),ze=i(e),g(Q.$$.fragment,e),Pe=i(e),X=u(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-sliug8"&&(X.innerHTML=ct),Ue=i(e),g(G.$$.fragment,e),Re=i(e),K=u(e,"P",{"data-svelte-h":!0}),c(K)!=="svelte-nvx63g"&&(K.innerHTML=pt),De=i(e),g(ee.$$.fragment,e),Ee=i(e),te=u(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1t5cmt5"&&(te.textContent=ht),Ie=i(e),ne=u(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-ysghuv"&&(ne.innerHTML=ft),Fe=i(e),g(oe.$$.fragment,e),Ye=i(e),ie=u(e,"P",{}),wt(ie).forEach(n),this.h()},h(){Ve(l,"name","hf:doc:metadata"),Ve(l,"content",Pt),Ve(L,"href","https://huggingface.co/new-space?template=zenml/zenml-template-space")},m(e,t){Ct(document.head,l),o(e,s,t),o(e,f,t),o(e,b,t),d(h,e,t),o(e,T,t),o(e,p,t),o(e,se,t),o(e,S,t),o(e,le,t),o(e,H,t),o(e,re,t),o(e,Z,t),o(e,ue,t),o(e,z,t),o(e,ce,t),o(e,P,t),o(e,pe,t),d(U,e,t),o(e,he,t),o(e,R,t),o(e,fe,t),o(e,L,t),o(e,me,t),o(e,D,t),o(e,ge,t),o(e,E,t),o(e,de,t),o(e,I,t),o(e,ye,t),o(e,F,t),o(e,we,t),o(e,Y,t),o(e,$e,t),o(e,j,t),o(e,ve,t),d(O,e,t),o(e,be,t),o(e,A,t),o(e,Le,t),d(M,e,t),o(e,Me,t),o(e,N,t),o(e,xe,t),d(V,e,t),o(e,Ce,t),o(e,q,t),o(e,_e,t),d(x,e,t),o(e,Te,t),d(W,e,t),o(e,ke,t),o(e,J,t),o(e,Se,t),d(C,e,t),o(e,He,t),o(e,B,t),o(e,Ze,t),d(_,e,t),o(e,ze,t),d(Q,e,t),o(e,Pe,t),o(e,X,t),o(e,Ue,t),d(G,e,t),o(e,Re,t),o(e,K,t),o(e,De,t),d(ee,e,t),o(e,Ee,t),o(e,te,t),o(e,Ie,t),o(e,ne,t),o(e,Fe,t),d(oe,e,t),o(e,Ye,t),o(e,ie,t),je=!0},p(e,[t]){const mt={};t&2&&(mt.$$scope={dirty:t,ctx:e}),M.$set(mt);const gt={};t&2&&(gt.$$scope={dirty:t,ctx:e}),x.$set(gt);const dt={};t&2&&(dt.$$scope={dirty:t,ctx:e}),C.$set(dt);const yt={};t&2&&(yt.$$scope={dirty:t,ctx:e}),_.$set(yt)},i(e){je||(y(h.$$.fragment,e),y(U.$$.fragment,e),y(O.$$.fragment,e),y(M.$$.fragment,e),y(V.$$.fragment,e),y(x.$$.fragment,e),y(W.$$.fragment,e),y(C.$$.fragment,e),y(_.$$.fragment,e),y(Q.$$.fragment,e),y(G.$$.fragment,e),y(ee.$$.fragment,e),y(oe.$$.fragment,e),je=!0)},o(e){w(h.$$.fragment,e),w(U.$$.fragment,e),w(O.$$.fragment,e),w(M.$$.fragment,e),w(V.$$.fragment,e),w(x.$$.fragment,e),w(W.$$.fragment,e),w(C.$$.fragment,e),w(_.$$.fragment,e),w(Q.$$.fragment,e),w(G.$$.fragment,e),w(ee.$$.fragment,e),w(oe.$$.fragment,e),je=!1},d(e){e&&(n(s),n(f),n(b),n(T),n(p),n(se),n(S),n(le),n(H),n(re),n(Z),n(ue),n(z),n(ce),n(P),n(pe),n(he),n(R),n(fe),n(L),n(me),n(D),n(ge),n(E),n(de),n(I),n(ye),n(F),n(we),n(Y),n($e),n(j),n(ve),n(be),n(A),n(Le),n(Me),n(N),n(xe),n(Ce),n(q),n(_e),n(Te),n(ke),n(J),n(Se),n(He),n(B),n(Ze),n(ze),n(Pe),n(X),n(Ue),n(Re),n(K),n(De),n(Ee),n(te),n(Ie),n(ne),n(Fe),n(Ye),n(ie)),n(l),$(h,e),$(U,e),$(O,e),$(M,e),$(V,e),$(x,e),$(W,e),$(C,e),$(_,e),$(Q,e),$(G,e),$(ee,e),$(oe,e)}}}const Pt='{"title":"ZenML on Spaces","local":"zenml-on-spaces","sections":[{"title":"⚡️ Deploy ZenML on Spaces","local":"-deploy-zenml-on-spaces","sections":[],"depth":2},{"title":"Connecting to your ZenML Server from your Local Machine","local":"connecting-to-your-zenml-server-from-your-local-machine","sections":[],"depth":2},{"title":"Extra Configuration Options","local":"extra-configuration-options","sections":[],"depth":2},{"title":"Upgrading your ZenML Server on HF Spaces","local":"upgrading-your-zenml-server-on-hf-spaces","sections":[],"depth":2},{"title":"Next Steps","local":"next-steps","sections":[],"depth":2},{"title":"🤗 Feedback and support","local":"-feedback-and-support","sections":[],"depth":2}],"depth":1}';function Ut(v){return vt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Yt extends Lt{constructor(l){super(),Mt(this,l,Ut,zt,$t,{})}}export{Yt as component};
