<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ameya Shenoy</title>
    <description>The latest articles on DEV Community by Ameya Shenoy (@codingcoffee).</description>
    <link>https://dev.to/codingcoffee</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F356627%2Fdfc5a46c-67d8-4460-bc47-8522fd32b2eb.jpeg</url>
      <title>DEV Community: Ameya Shenoy</title>
      <link>https://dev.to/codingcoffee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codingcoffee"/>
    <language>en</language>
    <item>
      <title>Dockerized folding@home client, with NVIDIA GPU support to help fight COVID-19</title>
      <dc:creator>Ameya Shenoy</dc:creator>
      <pubDate>Sat, 28 Mar 2020 11:03:54 +0000</pubDate>
      <link>https://dev.to/codingcoffee/dockerized-folding-home-client-with-nvidia-gpu-support-mkg</link>
      <guid>https://dev.to/codingcoffee/dockerized-folding-home-client-with-nvidia-gpu-support-mkg</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/codingcoffee/fahclient"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Sg88TVj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/codingCoffee/fahclient/master/.assets/images/docker-fahclient.png" width="250"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;a href="https://github.com/codingcoffee/fahclient/blob/master/LICENSE"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w3ZGL1rS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/github/license/codingcoffee/fahclient" alt="License"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hub.docker.com/r/codingcoffee/fahclient"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fyJuNnok--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/docker/pulls/codingcoffee/fahclient" alt="Docker Pulls"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hub.docker.com/r/codingcoffee/fahclient/tags?name=latest"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cSq5A-H6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.shields.io/docker/image-size/codingcoffee/fahclient%3Fsort%3Ddate" alt="Docker Image Size (tag)"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/codingCoffee/fahclient/actions?query=workflow%3A%22Docker+Image+CI%22"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Nt0-kWQe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/codingCoffee/fahclient/workflows/Docker%2520Image%2520CI/badge.svg" alt="Docker Image CI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://foldingathome.org"&gt;Folding@home (FAH or F@h)&lt;/a&gt; is a distributed computing project for simulating protein dynamics, including the process of protein folding and the movements of proteins implicated in a variety of diseases. It brings together citizen scientists who volunteer to run simulations of protein dynamics on their personal computers. Insights from this data are helping scientists to better understand biology, and providing new opportunities for developing therapeutics.&lt;/p&gt;
&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CPU only
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; fahclient &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 7396:7396 &lt;span class="se"&gt;\&lt;/span&gt;
  codingcoffee/fahclient &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--allow&lt;/span&gt; 0/0  &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--web-allow&lt;/span&gt; 0/0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;CPU and GPU
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="nt"&gt;--rm&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; fahclient &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--gpus&lt;/span&gt; all &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-p&lt;/span&gt; 7396:7396 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-e&lt;/span&gt; &lt;span class="nv"&gt;ENABLE_GPU&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  codingcoffee/fahclient &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--allow&lt;/span&gt; 0/0  &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--web-allow&lt;/span&gt; 0/0
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can also visit the web dashboard by visiting &lt;a href="http://localhost:7396"&gt;http://localhost:7396&lt;/a&gt; in your browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JifJzaDx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/codingCoffee/fahclient/master/.assets/images/fahclient_web_dashboard.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JifJzaDx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/codingCoffee/fahclient/master/.assets/images/fahclient_web_dashboard.png" width="750"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  GPU Support
&lt;/h2&gt;

&lt;p&gt;Since this image uses &lt;a href="https://hub.docker.com/r/nvidia/cuda"&gt;nvidia/cuda&lt;/a&gt; as it's base image, to use the GPU support, you'll need to have an NVIDIA GPU, and &lt;a href="https://github.com/NVIDIA/nvidia-docker"&gt;NVIDIA Container Toolkit&lt;/a&gt; installed on your system.&lt;/p&gt;
&lt;h2&gt;
  
  
  List of usable environment variables
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Environment Varible&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;USER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;your username&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Anonumous&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;TEAM&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;your team name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;PASSKEY&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;your passkey&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ENABLE_GPU&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ENABLE_SMP&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt;/&lt;code&gt;false&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;POWER&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;full&lt;/code&gt;/&lt;code&gt;medium&lt;/code&gt;/&lt;code&gt;light&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;full&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;Q: How can I use this with Docker Compose?&lt;/p&gt;

&lt;p&gt;A: Well, you can use it with docker compose if you don't want the GPU support. This is because docker compose still doesn't have the a way to specify the &lt;code&gt;--gpu&lt;/code&gt; flag, or atleast I wasn't able to figure it out. If you did, open a issue / send a PR with the &lt;code&gt;docker-compose.yml&lt;/code&gt; file.&lt;/p&gt;
&lt;h2&gt;
  
  
  Logs
&lt;/h2&gt;

&lt;p&gt;To get the logs of the running container&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker logs &lt;span class="nt"&gt;-f&lt;/span&gt; fahclient
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Build
&lt;/h2&gt;

&lt;p&gt;To build the image locally&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight shell"&gt;&lt;code&gt;docker build &lt;span class="nt"&gt;-t&lt;/span&gt; codingcoffee/fahclient &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Contribution
&lt;/h2&gt;

&lt;p&gt;Have better suggestions to optimize the image? Found some typos? Go ahead and send in a Pull Request! Contributions of any kind welcome!&lt;/p&gt;

&lt;h2&gt;
  
  
  LICENSE
&lt;/h2&gt;

&lt;p&gt;The code in this repository has been released under the &lt;a href="https://github.com/codingcoffee/fahclient/blob/master/LICENSE"&gt;GNU General Public License v3&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
    </item>
  </channel>
</rss>
