Deployed 8d1ad9a with MkDocs version: 1.3.0
This commit is contained in:
parent
1a6a68ffcc
commit
25a66fb86b
46 changed files with 10768 additions and 1924 deletions
|
|
@ -340,30 +340,10 @@
|
|||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#manual-deployment" class="md-nav__link">
|
||||
Manual deployment
|
||||
<a href="#go-back-to-the-summary" class="md-nav__link">
|
||||
Go back to the summary
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#containerised-deployment" class="md-nav__link">
|
||||
Containerised deployment
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Containerised deployment">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#use-a-platform-as-a-service" class="md-nav__link">
|
||||
Use a Platform-as-a-Service
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -423,6 +403,90 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/configure-service/" class="md-nav__link">
|
||||
How to configure GreatAI
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/use-service/" class="md-nav__link">
|
||||
How to use a GreatAI service
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/handle-training-data/" class="md-nav__link">
|
||||
How to handle training data
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/large_file/" class="md-nav__link">
|
||||
How to use LargeFile
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/call_remote.md" class="md-nav__link">
|
||||
None
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../how-to-guides/scraping/" class="md-nav__link">
|
||||
Scraping
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
|
|
@ -464,7 +528,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../reference/" class="md-nav__link">
|
||||
Reference
|
||||
GreatAI reference
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
|
@ -526,6 +590,115 @@
|
|||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--nested">
|
||||
|
||||
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5" type="checkbox" id="__nav_5" >
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__link" for="__nav_5">
|
||||
Examples
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
</label>
|
||||
|
||||
<nav class="md-nav" aria-label="Examples" data-md-level="1">
|
||||
<label class="md-nav__title" for="__nav_5">
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
Examples
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item md-nav__item--nested">
|
||||
|
||||
|
||||
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_5_1" type="checkbox" id="__nav_5_1" >
|
||||
|
||||
|
||||
|
||||
|
||||
<label class="md-nav__link" for="__nav_5_1">
|
||||
Explainable Naive Bayes
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
</label>
|
||||
|
||||
<nav class="md-nav" aria-label="Explainable Naive Bayes" data-md-level="2">
|
||||
<label class="md-nav__title" for="__nav_5_1">
|
||||
<span class="md-nav__icon md-icon"></span>
|
||||
Explainable Naive Bayes
|
||||
</label>
|
||||
<ul class="md-nav__list" data-md-scrollfix>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../examples/simple/data/" class="md-nav__link">
|
||||
Train a domain classifier on the semantic scholar dataset
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../examples/simple/train/" class="md-nav__link">
|
||||
Train a domain classifier on the semantic scholar dataset
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../examples/simple/deploy/" class="md-nav__link">
|
||||
Train a domain classifier on the semantic scholar dataset
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../explanation/" class="md-nav__link">
|
||||
Explanation
|
||||
|
|
@ -561,30 +734,10 @@
|
|||
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#manual-deployment" class="md-nav__link">
|
||||
Manual deployment
|
||||
<a href="#go-back-to-the-summary" class="md-nav__link">
|
||||
Go back to the summary
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#containerised-deployment" class="md-nav__link">
|
||||
Containerised deployment
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Containerised deployment">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#use-a-platform-as-a-service" class="md-nav__link">
|
||||
Use a Platform-as-a-Service
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
|
@ -1899,36 +2052,7 @@ def predict_domain(sentence, model):
|
|||
<div class="jp-InputArea jp-Cell-inputArea"><div class="jp-InputPrompt jp-InputArea-prompt">
|
||||
</div><div class="jp-RenderedHTMLCommon jp-RenderedMarkdown jp-MarkdownOutput " data-mime-type="text/markdown">
|
||||
<p>Now that you've made sure your application is hardened enough for the intended use case, it is time to deploy it. The responsibilities of GreatAI end when it wraps your inference function and model into a production-ready service. You're given the freedom and responsibility to deploy this service. Fortunately, you (or your organisation) probably already has an established routine for deploying services.</p>
|
||||
<p>There are three main approaches to deploy a GreatAI service.</p>
|
||||
<h3 id="manual-deployment">Manual deployment<a class="anchor-link" href="#manual-deployment">¶</a></h3><p>Simply run <code>ENVIRONMENT=production great-ai deploy.ipynb</code> in the command-line of a production machine.</p>
|
||||
<blockquote><p>This is the crudest approach, however, it might be fitting for some contexts.</p>
|
||||
</blockquote>
|
||||
<h3 id="containerised-deployment">Containerised deployment<a class="anchor-link" href="#containerised-deployment">¶</a></h3><p>Run the notebook directly in a container or create a service for it using your favourite orchestrator.</p>
|
||||
<div class="highlight"><pre><span></span>docker run <span class="se">\</span>
|
||||
-p <span class="m">6060</span>:6060 <span class="se">\</span>
|
||||
--volume <span class="sb">`</span><span class="nb">pwd</span><span class="sb">`</span>:/app <span class="se">\</span>
|
||||
--rm <span class="se">\</span>
|
||||
schmelczera/great-ai deploy.ipynb
|
||||
</pre></div>
|
||||
<blockquote><p>You can replace <code>pwd</code> with the path to your code's folder.</p>
|
||||
</blockquote>
|
||||
<h4 id="use-a-platform-as-a-service">Use a Platform-as-a-Service<a class="anchor-link" href="#use-a-platform-as-a-service">¶</a></h4><p>Similarly to the previous approach, your code will run in a container. However, instead of manually managing it, you can just choose from a plethora of PaaS providers that take a Docker image as a source and handle the rest of the deployment.</p>
|
||||
<p>To this end, you can also create a custom Docker image. It is especially useful if you have third-party dependencies, such as pytorch or tensorflow.</p>
|
||||
<div class="highlight"><pre><span></span><span class="k">FROM</span><span class="w"> </span><span class="s">schmelczera/great-ai:latest</span>
|
||||
|
||||
<span class="c"># Remove this block if you don't have a requirements.txt</span>
|
||||
<span class="k">COPY</span><span class="w"> </span>requirements.txt ./
|
||||
<span class="k">RUN</span><span class="w"> </span>pip install --no-cache-dir --requirement requirements.txt
|
||||
|
||||
<span class="c"># If you store your models in S3 or GridFS, it may be a </span>
|
||||
<span class="c"># good idea to # cache them in the image so that you don't</span>
|
||||
<span class="c"># have to download it each time a container starts</span>
|
||||
<span class="c"># RUN large-file --backend s3 --secrets s3.ini --cache my-domain-predictor</span>
|
||||
|
||||
<span class="k">COPY</span><span class="w"> </span>. .
|
||||
|
||||
<span class="k">CMD</span><span class="w"> </span><span class="p">[</span><span class="s2">"deploy.ipynb"</span><span class="p">]</span>
|
||||
</pre></div>
|
||||
<p>There are three main approaches to deploy a GreatAI service: For more info about them, check out <a href="/how-to-guides/use-service">the deployment how-to</a>.</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1954,7 +2078,7 @@ def predict_domain(sentence, model):
|
|||
<small>
|
||||
|
||||
Last update:
|
||||
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 9, 2022</span>
|
||||
<span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">July 11, 2022</span>
|
||||
|
||||
|
||||
</small>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue