forked from intel/dffml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
installation.html
422 lines (300 loc) · 25.4 KB
/
installation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Installation — DFFML 0.4.0 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/tabs.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/tabs.js"></script>
<script src="_static/copybutton.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<link rel="author" title="About these documents" href="about.html" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="Concepts" href="concepts/index.html" />
<link rel="prev" title="About" href="about.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> DFFML
</a>
<div class="version">
0.4.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Introduction</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="about.html">About</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#installing-all-plugins">Installing All Plugins</a></li>
<li class="toctree-l2"><a class="reference internal" href="#master-branch">Master Branch</a></li>
<li class="toctree-l2"><a class="reference internal" href="#ubuntu">Ubuntu</a></li>
<li class="toctree-l2"><a class="reference internal" href="#docker">Docker</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="concepts/index.html">Concepts</a></li>
</ul>
<p class="caption"><span class="caption-text">Usage</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="quickstart/model.html">Quickstart</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorials/index.html">Tutorials</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Examples</a></li>
</ul>
<p class="caption"><span class="caption-text">Reference</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="plugins/index.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="cli.html">Command Line</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins/service/http/index.html">HTTP API</a></li>
<li class="toctree-l1"><a class="reference internal" href="api/index.html">API Reference</a></li>
<li class="toctree-l1"><a class="reference internal" href="troubleshooting.html">Troubleshooting</a></li>
</ul>
<p class="caption"><span class="caption-text">Subprojects</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="shouldi.html">shouldi</a></li>
<li class="toctree-l1"><a class="reference internal" href="swportal.html">Software Portal</a></li>
</ul>
<p class="caption"><span class="caption-text">Community</span></p>
<ul>
<li class="toctree-l1"><a class="reference external" href="https://github.com/intel/dffml">GitHub</a></li>
<li class="toctree-l1"><a class="reference external" href="https://intel.github.io/dffml/master/">Master Branch Docs</a></li>
<li class="toctree-l1"><a class="reference internal" href="publications.html">Publications</a></li>
<li class="toctree-l1"><a class="reference internal" href="contact.html">Contact Us</a></li>
<li class="toctree-l1"><a class="reference internal" href="contributing/index.html">Contributing</a></li>
<li class="toctree-l1"><a class="reference internal" href="news/index.html">News</a></li>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Changelog</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">DFFML</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> »</li>
<li>Installation</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/intel/dffml/blob/master/docs/installation.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<p>DFFML currently <strong>supports Python 3.7 and 3.8 on Linux</strong>. If your distribution’s
package manager doesn’t provide Python 3.7 or 3.8,
<a class="reference external" href="https://github.com/pyenv/pyenv#simple-python-version-management-pyenv">pyenv</a>
is another good way to install it. You could also use the docker container.</p>
<p><strong>Windows and MacOS are not officially supported yet</strong>. Support varies by which
plugins you install. We do not currently have a list of what is supported and
what is not supported on those OSs. Most things should work. However, until we
are testing for everything we won’t declare them to be officially supported.
Please create issues for any problems you encounter.</p>
<p>First make sure you have the latest versions of <code class="docutils literal notranslate"><span class="pre">pip</span></code>, <code class="docutils literal notranslate"><span class="pre">setuptools</span></code>, and
<code class="docutils literal notranslate"><span class="pre">wheel</span></code>. Some ML libraries require them to be up-to-date.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-0-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-0-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-0-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-0-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-0-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-0-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U pip setuptools wheel
</pre></div>
</div>
</div><div aria-labelledby="tab-0-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-0-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><p>On Windows you may want to first create a virtual environment to avoid
any permissions issues when running <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">C:\Users\username> python -m venv .venv</span>
<span class="go">C:\Users\username> .venv\Scripts\activate</span>
<span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U pip setuptools wheel</span>
</pre></div>
</div>
</div></div>
<p>DFFML is available via pip. You can install it as you would any other Python
package.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-1-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-1-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-1-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-1-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-1-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-1-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U dffml
</pre></div>
</div>
</div><div aria-labelledby="tab-1-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-1-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U dffml</span>
</pre></div>
</div>
</div></div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Make sure that if pip is complaining that directories are not in your
<code class="docutils literal notranslate"><span class="pre">PATH</span></code>, that you add those directories to your <code class="docutils literal notranslate"><span class="pre">PATH</span></code> environment
variable!.</p>
</div>
<p>You should now be able to run the <code class="docutils literal notranslate"><span class="pre">dffml</span> <span class="pre">version</span></code> command. If you have issues
adding directories to your <code class="docutils literal notranslate"><span class="pre">PATH</span></code>, you can always run <code class="docutils literal notranslate"><span class="pre">dffml</span></code> command line
commands using Pythons module run syntax (<code class="docutils literal notranslate"><span class="pre">python</span> <span class="pre">-m</span></code>).</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m dffml version
<span class="gp">$ </span>dffml version
</pre></div>
</div>
<p>You can now see the <a class="reference internal" href="quickstart/model.html"><span class="doc">Quickstart</span></a> to get started using DFFML!</p>
<div class="section" id="installing-all-plugins">
<h2>Installing All Plugins<a class="headerlink" href="#installing-all-plugins" title="Permalink to this headline">¶</a></h2>
<p>If you want to install all of the machine learning model plugins that are
maintained as a part of the core repository, you can append <code class="docutils literal notranslate"><span class="pre">[models]</span></code>.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Due to an upstream issue (tracked as
<a class="reference external" href="https://github.com/intel/dffml/issues/992">https://github.com/intel/dffml/issues/992</a>) installing all models
together requires the addtion of a patched <code class="docutils literal notranslate"><span class="pre">ConfigSpace</span></code> package to the
following install commands.</p>
</div>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-2-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-2-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-2-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-2-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-2-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-2-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U dffml<span class="o">[</span>models<span class="o">]</span> <span class="s2">"https://github.com/automl/ConfigSpace/archive/86863bc2f640892675c04de0b8006a623dc14c45.zip#egg=ConfigSpace"</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-2-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-2-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U dffml[models]</span>
</pre></div>
</div>
</div></div>
<p>If you want to install all of the machine learning model plugins and all the
data sources and DataFlow operations that are maintained as a part of the core
repository, you can append <code class="docutils literal notranslate"><span class="pre">[all]</span></code>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-3-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-3-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-3-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-3-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-3-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-3-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U dffml<span class="o">[</span>all<span class="o">]</span> <span class="s2">"https://github.com/automl/ConfigSpace/archive/86863bc2f640892675c04de0b8006a623dc14c45.zip#egg=ConfigSpace"</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-3-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-3-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U dffml[all]</span>
</pre></div>
</div>
</div></div>
</div>
<div class="section" id="master-branch">
<h2>Master Branch<a class="headerlink" href="#master-branch" title="Permalink to this headline">¶</a></h2>
<p>If you want to stay on the bleeding edge of bug fixes, etc. You can install from
the master branch.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-4-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-4-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-4-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-4-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-4-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-4-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U <span class="s2">"https://github.com/intel/dffml/archive/master.zip#egg=dffml"</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-4-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-4-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U "https://github.com/intel/dffml/archive/master.zip#egg=dffml"</span>
</pre></div>
</div>
</div></div>
<p>You can also install the bleeding edge version of any plugin. To get the
subdirectory you should use, take the package name on PyPi and remove <code class="docutils literal notranslate"><span class="pre">dffml-</span></code>
and replace <code class="docutils literal notranslate"><span class="pre">-</span></code> with <code class="docutils literal notranslate"><span class="pre">/</span></code>.</p>
<div class="sphinx-tabs docutils container">
<div aria-label="Tabbed content" class="closeable" role="tablist"><button aria-controls="panel-5-TGludXggYW5kIE1hY09T" aria-selected="true" class="sphinx-tabs-tab group-tab" id="tab-5-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tab" tabindex="0">Linux and MacOS</button><button aria-controls="panel-5-V2luZG93cw==" aria-selected="false" class="sphinx-tabs-tab group-tab" id="tab-5-V2luZG93cw==" name="V2luZG93cw==" role="tab" tabindex="-1">Windows</button></div><div aria-labelledby="tab-5-TGludXggYW5kIE1hY09T" class="sphinx-tabs-panel group-tab" id="panel-5-TGludXggYW5kIE1hY09T" name="TGludXggYW5kIE1hY09T" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>python -m pip install -U <span class="s2">"https://github.com/intel/dffml/archive/master.zip#egg=dffml"</span> <span class="se">\</span>
<span class="go"> "https://github.com/intel/dffml/archive/master.zip#egg=dffml-feature-git&subdirectory=feature/git"</span>
</pre></div>
</div>
</div><div aria-labelledby="tab-5-V2luZG93cw==" class="sphinx-tabs-panel group-tab" hidden="true" id="panel-5-V2luZG93cw==" name="V2luZG93cw==" role="tabpanel" tabindex="0"><div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp gp-VirtualEnv">(.venv)</span> <span class="go">C:\Users\username> python -m pip install -U "https://github.com/intel/dffml/archive/master.zip#egg=dffml" ^</span>
<span class="go"> "https://github.com/intel/dffml/archive/master.zip#egg=dffml-feature-git&subdirectory=feature/git"</span>
</pre></div>
</div>
</div></div>
<p>There’s an online IDE based on Theia (similar to VS Code) called GitPod that
gives you a setup development environment to get started working with/on DFFML
right away. However, it comes with the master branch installed, you’ll need to
run the above commands to get the lastest released version.</p>
<a class="reference external image-reference" href="https://gitpod.io/#https://github.com/intel/dffml"><img alt="https://gitpod.io/button/open-in-gitpod.svg" src="https://gitpod.io/button/open-in-gitpod.svg" /></a>
</div>
<div class="section" id="ubuntu">
<h2>Ubuntu<a class="headerlink" href="#ubuntu" title="Permalink to this headline">¶</a></h2>
<p>For Ubuntu 20.XX python3 means Python 3.8 so far as <code class="docutils literal notranslate"><span class="pre">apt</span></code> is concerend.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>sudo apt-get update <span class="o">&&</span> sudo apt-get install -y python3 python3-pip
</pre></div>
</div>
<p>For Ubuntu 18.XX python3 means Python 3.6 so far as <code class="docutils literal notranslate"><span class="pre">apt</span></code> is concerend.
However, <code class="docutils literal notranslate"><span class="pre">python3-pip</span></code> works for all 3.X versions. So you’ll need to install
the following packages to get <code class="docutils literal notranslate"><span class="pre">python3.7</span></code> with <code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>sudo apt-get update <span class="o">&&</span> sudo apt-get install -y python3.7 python3-pip
</pre></div>
</div>
</div>
<div class="section" id="docker">
<h2>Docker<a class="headerlink" href="#docker" title="Permalink to this headline">¶</a></h2>
<p>This is a good option if you don’t want to deal with installing Python 3.7.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>docker pull intelotc/dffml
</pre></div>
</div>
<p>You can also build the container image yourself if you’d like.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>docker build -t intelotc/dffml .
</pre></div>
</div>
<p>You can then make a bash function to run the dffml docker container.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>dffml<span class="o">()</span> <span class="o">{</span>
docker run --rm -ti <span class="se">\</span>
-v <span class="nv">$HOME</span>/.local:/home/<span class="nv">$USER</span>/.local/ <span class="se">\</span>
-v <span class="nv">$HOME</span>/.cache:/home/<span class="nv">$USER</span>/.cache/ <span class="se">\</span>
-v <span class="nv">$PWD</span>:/workdir -w /workdir <span class="se">\</span>
-e <span class="nv">UID</span><span class="o">=</span><span class="k">$(</span>id -u<span class="k">)</span> -e <span class="nv">USER</span><span class="o">=</span><span class="nv">$USER</span> <span class="se">\</span>
intelotc/dffml <span class="nv">$@</span>
<span class="o">}</span>
</pre></div>
</div>
<p>This creates an alias that takes your current working directory and mounts it
into <code class="docutils literal notranslate"><span class="pre">/workdir</span></code> as well as your <code class="docutils literal notranslate"><span class="pre">$HOME/.local</span></code> to the same in the container.</p>
<p>With the alias, you can run <code class="docutils literal notranslate"><span class="pre">dffml</span></code> commands as if you’d installed via
<code class="docutils literal notranslate"><span class="pre">pip</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>dffml list
</pre></div>
</div>
<p>Keep in mind that if you’re working on files they can only be ones in your
current working directory, and if you want to access network resources and they
are on your host, you’ll have to talk to <code class="docutils literal notranslate"><span class="pre">172.17.0.1</span></code> (docker0 inet address)
instead of <code class="docutils literal notranslate"><span class="pre">localhost</span></code> or <code class="docutils literal notranslate"><span class="pre">127.0.0.1</span></code>.</p>
<p>The purpose of mounting <code class="docutils literal notranslate"><span class="pre">$HOME/.local</span></code> is so that if you want to
<code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span></code> anything, you can, and it will persist between invocations due
to that being on the host.</p>
<p>If you wan to run <code class="docutils literal notranslate"><span class="pre">pip</span></code> you can put it after <code class="docutils literal notranslate"><span class="pre">dffml</span></code>.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="gp">$ </span>dffml pip install example
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="concepts/index.html" class="btn btn-neutral float-right" title="Concepts" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="about.html" class="btn btn-neutral float-left" title="About" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2017 - 2021, Intel.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>