<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - Ayaz Salikhov</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-ayaz-salikhov.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2024-04-17T09:01:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>CUDA enabled Jupyter Docker Images</title><link href="https://jasongrout.github.io/medium-archive/pelican/posts/2024/cuda-enabled-jupyter-docker-images/" rel="alternate"/><published>2024-04-16T22:08:00+00:00</published><updated>2024-04-17T09:01:00+00:00</updated><author><name>Ayaz Salikhov</name></author><id>tag:jasongrout.github.io,2024-04-16:/medium-archive/pelican/posts/2024/cuda-enabled-jupyter-docker-images/</id><summary type="html">&lt;p&gt;I am happy to announce that Jupyter Docker Stacks project now provides GPU accelerated Docker images. This allows PyTorch or TensorFlow…&lt;/p&gt;
</summary><content type="html">&lt;p&gt;I am happy to announce that &lt;a href="https://jupyter-docker-stacks.readthedocs.io/en/latest/index.html"&gt;Jupyter Docker Stacks project&lt;/a&gt; now provides GPU accelerated Docker images. This allows PyTorch or TensorFlow operations to use compatible NVIDIA GPUs for accelerated computation.&lt;/p&gt;
&lt;h3 id="how-to-find-these-images"&gt;How to find these images&lt;/h3&gt;
&lt;p&gt;All our images are available on &lt;a href="https://quay.io/organization/jupyter"&gt;Quay.io registry&lt;/a&gt;. We provide CUDA accelerated versions of images are available for &lt;code&gt;tensorflow-notebook&lt;/code&gt; and &lt;code&gt;pytorch-notebook&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To use such an image, you have to specify a special prefix tag to the image: versioned CUDA prefix like &lt;code&gt;cuda11-&lt;/code&gt; or &lt;code&gt;cuda12-&lt;/code&gt; for &lt;code&gt;pytorch-notebook&lt;/code&gt; or just &lt;code&gt;cuda-&lt;/code&gt; for &lt;code&gt;tensorflow-notebook&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We build &lt;code&gt;pytorch-notebook&lt;/code&gt; only for 2 last major versions of CUDA, &lt;code&gt;tensorflow-notebook&lt;/code&gt; image supports only the latest CUDA version listed in the &lt;a href="https://www.tensorflow.org/install/source#gpu"&gt;officially tested build configurations&lt;/a&gt; list. CUDA-enabled images are available on x86_64 platform.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For example, you can use an image &lt;code&gt;quay.io/jupyter/pytorch-notebook:cuda12-python-3.11.8&lt;/code&gt; or &lt;code&gt;quay.io/jupyter/tensorflow-notebook:cuda-latest&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="running-the-images"&gt;Running the images&lt;/h3&gt;
&lt;p&gt;To enable CUDA support on &lt;strong&gt;Linux&lt;/strong&gt; host machine, you need to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;have compatible Nvidia GPU&lt;/li&gt;
&lt;li&gt;have NVIDIA Linux driver installed&lt;/li&gt;
&lt;li&gt;add &lt;code&gt;--gpus all&lt;/code&gt; (or &lt;code&gt;--gpus '&amp;quot;device=all&amp;quot;'&lt;/code&gt;) flag to if you’re using &lt;code&gt;Docker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;add &lt;code&gt;--device 'nvidia.com/gpu=all'&lt;/code&gt; flag if you’re using &lt;code&gt;Podman&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, you can run the image like this: &lt;code&gt;docker run -it --rm -p 8888:8888 --gpus all quay.io/jupyter/tensorflow-notebook:cuda-latest&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can also enable GPU support on &lt;strong&gt;Windows&lt;/strong&gt; using &lt;a href="https://docs.docker.com/desktop/gpu/"&gt;Docker&lt;/a&gt; or &lt;a href="https://github.com/containers/podman/issues/19005"&gt;Podman&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="reaching-out"&gt;Reaching out&lt;/h3&gt;
&lt;p&gt;You will find our documentation &lt;a href="http://jupyter-docker-stacks.readthedocs.io"&gt;here&lt;/a&gt;.&lt;br&gt;
If you encounter any problems, please, take a look at &lt;a href="https://github.com/jupyter/docker-stacks"&gt;GitHub issues&lt;/a&gt;.&lt;br&gt;
If you would like to improve GPU support in our images, please, reach out &lt;a href="https://github.com/jupyter/docker-stacks/issues/1557"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="acknowledgments"&gt;Acknowledgments&lt;/h3&gt;
&lt;p&gt;I would like to thank:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/johanna-reiml-hpi"&gt;Johanna Reiml&lt;/a&gt;, for implementing general &lt;code&gt;variant&lt;/code&gt; concept for our images and making it work for &lt;code&gt;pytorch-notebook&lt;/code&gt; (PR &lt;a href="https://github.com/jupyter/docker-stacks/pull/2091"&gt;#2091&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ChristofKaufmann"&gt;Christof Kaufmann&lt;/a&gt;, for making it work for &lt;code&gt;tensorflow-notebook&lt;/code&gt; (PR &lt;a href="https://github.com/jupyter/docker-stacks/pull/2100"&gt;#2100&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/benz0li"&gt;Olivier Benz&lt;/a&gt;, for helping me out to write this blog post&lt;/li&gt;
&lt;/ul&gt;
</content><category term="Docker"/><category term="machine learning"/></entry></feed>