import{s as yt,o as wt,n as vt}from"../chunks/scheduler.d6170356.js";import{S as $t,i as bt,g as r,s as a,r as m,A as Lt,h as u,f as n,c as i,j as dt,u as g,x as c,k as Oe,y as Mt,a as o,v as d,d as y,t as w,w as v,m as je,n as Ae}from"../chunks/index.fcd4cc08.js";import{T as Ye}from"../chunks/Tip.b09c67cf.js";import{C as xt}from"../chunks/CodeBlock.7b16bdef.js";import{H as oe}from"../chunks/Heading.8660bd0e.js";function Ct($){let l;return{c(){l=je(`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=Ae(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 _t($){let l;return{c(){l=je(`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=Ae(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 Tt($){let l;return{c(){l=je(`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=Ae(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 kt($){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=je(`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=Ae(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:vt,d(p){p&&(n(l),n(s),n(b),n(h))}}}function St($){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.',ie,S,Ne=`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.`,se,H,Ve=`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.`,le,Z,qe=`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.`,re,z,We='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/zenml/hf_spaces_chart.png" alt="ZenML on HuggingFace Spaces -- default deployment"/>',ue,P,Je=`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.`,ce,U,pe,R,Be="You can deploy ZenML on Spaces with just a few clicks:",he,L,Qe='<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/deploy-to-spaces-lg.svg"/>',fe,D,Xe=`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.`,me,I,Ge='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/zenml/choose_space.png" alt="Choose the ZenML Docker template"/>',ge,E,Ke=`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).`,de,F,et=`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>.`,ye,Y,tt=`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.`,we,j,nt=`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,A,$e,O,ot=`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).`,be,M,Le,N,at=`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):`,Me,V,xe,q,it=`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).`,Ce,x,_e,W,Te,J,st=`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.`,ke,C,Se,B,lt=`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.`,He,_,Ze,Q,ze,X,rt=`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.`,Pe,G,Ue,K,ut=`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.`,Re,ee,De,te,ct=`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,pt=`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!`,Ee,ae,Fe;return h=new oe({props:{title:"ZenML on Spaces",local:"zenml-on-spaces",headingTag:"h1"}}),U=new oe({props:{title:"⚡️ Deploy ZenML on Spaces",local:"-deploy-zenml-on-spaces",headingTag:"h2"}}),A=new oe({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 Ye({props:{warning:!0,$$slots:{default:[Ct]},$$scope:{ctx:$}}}),V=new xt({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 Ye({props:{warning:!0,$$slots:{default:[_t]},$$scope:{ctx:$}}}),W=new oe({props:{title:"Extra Configuration Options",local:"extra-configuration-options",headingTag:"h2"}}),C=new Ye({props:{$$slots:{default:[Tt]},$$scope:{ctx:$}}}),_=new Ye({props:{warning:!0,$$slots:{default:[kt]},$$scope:{ctx:$}}}),Q=new oe({props:{title:"Upgrading your ZenML Server on HF Spaces",local:"upgrading-your-zenml-server-on-hf-spaces",headingTag:"h2"}}),G=new oe({props:{title:"Next Steps",local:"next-steps",headingTag:"h2"}}),ee=new oe({props:{title:"🤗 Feedback and support",local:"-feedback-and-support",headingTag:"h2"}}),{c(){l=r("meta"),s=a(),f=r("p"),b=a(),m(h.$$.fragment),T=a(),p=r("p"),p.innerHTML=k,ie=a(),S=r("p"),S.textContent=Ne,se=a(),H=r("p"),H.textContent=Ve,le=a(),Z=r("p"),Z.innerHTML=qe,re=a(),z=r("p"),z.innerHTML=We,ue=a(),P=r("p"),P.innerHTML=Je,ce=a(),m(U.$$.fragment),pe=a(),R=r("p"),R.textContent=Be,he=a(),L=r("a"),L.innerHTML=Qe,fe=a(),D=r("p"),D.textContent=Xe,me=a(),I=r("p"),I.innerHTML=Ge,ge=a(),E=r("p"),E.textContent=Ke,de=a(),F=r("p"),F.innerHTML=et,ye=a(),Y=r("p"),Y.textContent=tt,we=a(),j=r("p"),j.innerHTML=nt,ve=a(),m(A.$$.fragment),$e=a(),O=r("p"),O.textContent=ot,be=a(),m(M.$$.fragment),Le=a(),N=r("p"),N.textContent=at,Me=a(),m(V.$$.fragment),xe=a(),q=r("p"),q.textContent=it,Ce=a(),m(x.$$.fragment),_e=a(),m(W.$$.fragment),Te=a(),J=r("p"),J.innerHTML=st,ke=a(),m(C.$$.fragment),Se=a(),B=r("p"),B.innerHTML=lt,He=a(),m(_.$$.fragment),Ze=a(),m(Q.$$.fragment),ze=a(),X=r("p"),X.innerHTML=rt,Pe=a(),m(G.$$.fragment),Ue=a(),K=r("p"),K.innerHTML=ut,Re=a(),m(ee.$$.fragment),De=a(),te=r("p"),te.textContent=ct,Ie=a(),ne=r("p"),ne.innerHTML=pt,Ee=a(),ae=r("p"),this.h()},l(e){const t=Lt("svelte-u9bgzb",document.head);l=u(t,"META",{name:!0,content:!0}),t.forEach(n),s=i(e),f=u(e,"P",{}),dt(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),ie=i(e),S=u(e,"P",{"data-svelte-h":!0}),c(S)!=="svelte-4e0nrh"&&(S.textContent=Ne),se=i(e),H=u(e,"P",{"data-svelte-h":!0}),c(H)!=="svelte-6eb5e1"&&(H.textContent=Ve),le=i(e),Z=u(e,"P",{"data-svelte-h":!0}),c(Z)!=="svelte-v0nlhn"&&(Z.innerHTML=qe),re=i(e),z=u(e,"P",{"data-svelte-h":!0}),c(z)!=="svelte-cr30gl"&&(z.innerHTML=We),ue=i(e),P=u(e,"P",{"data-svelte-h":!0}),c(P)!=="svelte-10w1dv6"&&(P.innerHTML=Je),ce=i(e),g(U.$$.fragment,e),pe=i(e),R=u(e,"P",{"data-svelte-h":!0}),c(R)!=="svelte-1ppvb5a"&&(R.textContent=Be),he=i(e),L=u(e,"A",{href:!0,"data-svelte-h":!0}),c(L)!=="svelte-h8yqkc"&&(L.innerHTML=Qe),fe=i(e),D=u(e,"P",{"data-svelte-h":!0}),c(D)!=="svelte-mdxpkf"&&(D.textContent=Xe),me=i(e),I=u(e,"P",{"data-svelte-h":!0}),c(I)!=="svelte-1a42vw4"&&(I.innerHTML=Ge),ge=i(e),E=u(e,"P",{"data-svelte-h":!0}),c(E)!=="svelte-6fl4l6"&&(E.textContent=Ke),de=i(e),F=u(e,"P",{"data-svelte-h":!0}),c(F)!=="svelte-1trbth0"&&(F.innerHTML=et),ye=i(e),Y=u(e,"P",{"data-svelte-h":!0}),c(Y)!=="svelte-b8aggg"&&(Y.textContent=tt),we=i(e),j=u(e,"P",{"data-svelte-h":!0}),c(j)!=="svelte-3b2pb6"&&(j.innerHTML=nt),ve=i(e),g(A.$$.fragment,e),$e=i(e),O=u(e,"P",{"data-svelte-h":!0}),c(O)!=="svelte-nzvood"&&(O.textContent=ot),be=i(e),g(M.$$.fragment,e),Le=i(e),N=u(e,"P",{"data-svelte-h":!0}),c(N)!=="svelte-ds5pw1"&&(N.textContent=at),Me=i(e),g(V.$$.fragment,e),xe=i(e),q=u(e,"P",{"data-svelte-h":!0}),c(q)!=="svelte-pwyhtz"&&(q.textContent=it),Ce=i(e),g(x.$$.fragment,e),_e=i(e),g(W.$$.fragment,e),Te=i(e),J=u(e,"P",{"data-svelte-h":!0}),c(J)!=="svelte-1qvsz0l"&&(J.innerHTML=st),ke=i(e),g(C.$$.fragment,e),Se=i(e),B=u(e,"P",{"data-svelte-h":!0}),c(B)!=="svelte-cas8ql"&&(B.innerHTML=lt),He=i(e),g(_.$$.fragment,e),Ze=i(e),g(Q.$$.fragment,e),ze=i(e),X=u(e,"P",{"data-svelte-h":!0}),c(X)!=="svelte-sliug8"&&(X.innerHTML=rt),Pe=i(e),g(G.$$.fragment,e),Ue=i(e),K=u(e,"P",{"data-svelte-h":!0}),c(K)!=="svelte-nvx63g"&&(K.innerHTML=ut),Re=i(e),g(ee.$$.fragment,e),De=i(e),te=u(e,"P",{"data-svelte-h":!0}),c(te)!=="svelte-1t5cmt5"&&(te.textContent=ct),Ie=i(e),ne=u(e,"P",{"data-svelte-h":!0}),c(ne)!=="svelte-ysghuv"&&(ne.innerHTML=pt),Ee=i(e),ae=u(e,"P",{}),dt(ae).forEach(n),this.h()},h(){Oe(l,"name","hf:doc:metadata"),Oe(l,"content",Ht),Oe(L,"href","https://huggingface.co/new-space?template=zenml/zenml-template-space")},m(e,t){Mt(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,ie,t),o(e,S,t),o(e,se,t),o(e,H,t),o(e,le,t),o(e,Z,t),o(e,re,t),o(e,z,t),o(e,ue,t),o(e,P,t),o(e,ce,t),d(U,e,t),o(e,pe,t),o(e,R,t),o(e,he,t),o(e,L,t),o(e,fe,t),o(e,D,t),o(e,me,t),o(e,I,t),o(e,ge,t),o(e,E,t),o(e,de,t),o(e,F,t),o(e,ye,t),o(e,Y,t),o(e,we,t),o(e,j,t),o(e,ve,t),d(A,e,t),o(e,$e,t),o(e,O,t),o(e,be,t),d(M,e,t),o(e,Le,t),o(e,N,t),o(e,Me,t),d(V,e,t),o(e,xe,t),o(e,q,t),o(e,Ce,t),d(x,e,t),o(e,_e,t),d(W,e,t),o(e,Te,t),o(e,J,t),o(e,ke,t),d(C,e,t),o(e,Se,t),o(e,B,t),o(e,He,t),d(_,e,t),o(e,Ze,t),d(Q,e,t),o(e,ze,t),o(e,X,t),o(e,Pe,t),d(G,e,t),o(e,Ue,t),o(e,K,t),o(e,Re,t),d(ee,e,t),o(e,De,t),o(e,te,t),o(e,Ie,t),o(e,ne,t),o(e,Ee,t),o(e,ae,t),Fe=!0},p(e,[t]){const ht={};t&2&&(ht.$$scope={dirty:t,ctx:e}),M.$set(ht);const ft={};t&2&&(ft.$$scope={dirty:t,ctx:e}),x.$set(ft);const mt={};t&2&&(mt.$$scope={dirty:t,ctx:e}),C.$set(mt);const gt={};t&2&&(gt.$$scope={dirty:t,ctx:e}),_.$set(gt)},i(e){Fe||(y(h.$$.fragment,e),y(U.$$.fragment,e),y(A.$$.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),Fe=!0)},o(e){w(h.$$.fragment,e),w(U.$$.fragment,e),w(A.$$.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),Fe=!1},d(e){e&&(n(s),n(f),n(b),n(T),n(p),n(ie),n(S),n(se),n(H),n(le),n(Z),n(re),n(z),n(ue),n(P),n(ce),n(pe),n(R),n(he),n(L),n(fe),n(D),n(me),n(I),n(ge),n(E),n(de),n(F),n(ye),n(Y),n(we),n(j),n(ve),n($e),n(O),n(be),n(Le),n(N),n(Me),n(xe),n(q),n(Ce),n(_e),n(Te),n(J),n(ke),n(Se),n(B),n(He),n(Ze),n(ze),n(X),n(Pe),n(Ue),n(K),n(Re),n(De),n(te),n(Ie),n(ne),n(Ee),n(ae)),n(l),v(h,e),v(U,e),v(A,e),v(M,e),v(V,e),v(x,e),v(W,e),v(C,e),v(_,e),v(Q,e),v(G,e),v(ee,e)}}}const Ht='{"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 Zt($){return wt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class It extends $t{constructor(l){super(),bt(this,l,Zt,St,yt,{})}}export{It as component};
