|
2 | 2 | <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> |
3 | 3 |
|
4 | 4 | <meta charset="utf-8"> |
5 | | -<meta name="generator" content="quarto-1.6.39"> |
| 5 | +<meta name="generator" content="quarto-1.6.42"> |
6 | 6 |
|
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> |
8 | 8 |
|
|
71 | 71 | <script src="site_libs/quarto-html/tippy.umd.min.js"></script> |
72 | 72 | <script src="site_libs/quarto-html/anchor.min.js"></script> |
73 | 73 | <link href="site_libs/quarto-html/tippy.css" rel="stylesheet"> |
74 | | -<link href="site_libs/quarto-html/quarto-syntax-highlighting-e26003cea8cd680ca0c55a263523d882.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles"> |
75 | | -<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark-d166b450ba5a8e9f7a0ab969bf6592c1.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles"> |
| 74 | +<link href="site_libs/quarto-html/quarto-syntax-highlighting-2f5df379a58b258e96c21c0638c20c03.css" rel="stylesheet" class="quarto-color-scheme" id="quarto-text-highlighting-styles"> |
| 75 | +<link href="site_libs/quarto-html/quarto-syntax-highlighting-dark-b53751a350365c71b6c909e95f209ed1.css" rel="prefetch" class="quarto-color-scheme quarto-color-alternate" id="quarto-text-highlighting-styles"> |
76 | 76 | <script src="site_libs/bootstrap/bootstrap.min.js"></script> |
77 | 77 | <link href="site_libs/bootstrap/bootstrap-icons.css" rel="stylesheet"> |
78 | 78 | <link href="site_libs/bootstrap/bootstrap-1c72828a604d1ca8431045bd307be2a9.min.css" rel="stylesheet" append-hash="true" class="quarto-color-scheme" id="quarto-bootstrap" data-mode="light"> |
@@ -326,11 +326,20 @@ <h3 data-number="5.4.1" class="anchored" data-anchor-id="installing-new-texlive- |
326 | 326 | <ul> |
327 | 327 | <li>Run <code>tlmgr option</code> to make sure tlmgr is working.</li> |
328 | 328 | </ul> |
329 | | -<p>Unfortunately any packages you install will be in the <code>/opt</code> directory and this gets recreated every time you restart your server. So if you need a particular package you will need to keep installing it. Or create your own image based on py-rocket-base:</p> |
330 | | -<p>Dockerfile</p> |
| 329 | +<p>By default in py-rocket-base when <code>tlmgr install</code> is run <code>TEXMFHOME</code> is used and that is set to <code>\home\jovyan\texmf</code>. This ensures that when users install texlive packages those are persistent in the user home directory.</p> |
| 330 | +<p>If you want to add texlive packages in a Dockerfile that uses py-rocket-base, then you need to unset <code>TEXMFHOME</code> otherwise the package is installed in <code>\home</code> and that is unattached in a JupyterHub (typically). Here is an example of Dockerfile code.</p> |
331 | 331 | <div class="sourceCode" id="cb4"><pre class="sourceCode markdown code-with-copy"><code class="sourceCode markdown"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a>FROM ghcr.io/nmfs-opensci/py-rocket-base:latest</span> |
332 | 332 | <span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a></span> |
333 | | -<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>RUN tlmgr install collection-latexrecommended && tlmgr clean --all</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> |
| 333 | +<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a>USER root</span> |
| 334 | +<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a>RUN unset TEXMFHOME && \</span> |
| 335 | +<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a> PATH=/usr/local/texlive/bin/linux:$PATH && \</span> |
| 336 | +<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a> echo "Installing texlive collections and extra packages..." && \</span> |
| 337 | +<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a> tlmgr install collection-latexrecommended collection-latexextra && \</span> |
| 338 | +<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a> tlmgr install \</span> |
| 339 | +<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a> pdfcol \</span> |
| 340 | +<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a> tcolorbox && \</span> |
| 341 | +<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a> tlmgr clean --all</span> |
| 342 | +<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a>USER ${NB_USER}</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div> |
334 | 343 |
|
335 | 344 |
|
336 | 345 | </section> |
|
0 commit comments