Coder Social home page Coder Social logo

fahclient-azure-vm's Introduction

DID YOU KNOW that you can help find a CURE for diseases like Covid19 (aka CORONAVIRUS) using your Azure subscription?

When working on finding a cure, researchers first narrow the search field using computational models. These computations take massive amounts of compute resources, so some labs allow the public to contribute compute resources they have on their personal computers to the project. They use a client called "Folding@Home". This app "folds" proteins in a simulated environment to discover potential proteins that can be used to treat diseases, including Covid 19

You can download it here and install it and help find a cure for deiseases on your computer at home here: https://foldingathome.org/. Installing it is pretty easy for a home computer.

I worked on this little project today to get it running on a virtual machine on Azure. I am working out the bugs in an automation script to install it on Azure.

This script installs the NVidia Drivers for the VM if you're using GPU's, installs and configures tre Fold@home software, and then proxies the Web Portal with an SSL reverse proxy and adds a logon to it so that accessing the web bortal over the intenet is secure. It also deploys the Azure VM and configures all the Azure resources automatically.

Deploy to Azure

  1. Click Deploy to Azure

  2. Logon to Azure if you are not already logged in. If you don't have an Azure account, you can sign up for one for free and get $200 in Azure Credits for 30 days.

  3. After logging in, fill out the form for your deployment on Azure.

    Create VM on Azure

    Under Basics...

    • Subscription -- Choose your subscription you intend to use with this deployment.
    • Resource Group -- Choose a Resource Group to deploy the VM to run the Fold At Home client into.
    • Location -- Select an Azure Region to deploy the VM. If you want to use GPU-based VM's (N-series) then choose East US, East US2, North Central US, South Central US, or West US 2. For global regions, check the availablity here.

    Under Settings...

    • Dns Name For Public IP -- This will be prepended to the front of an Azure URL. It is your unique DNS name, the region, then cloudapp.azure.com (ie. Azure blaizefah.eastus2.cloudapp.azure.com).
    • Admin Username -- Used for adminstration on the VM for SSH.
    • Admin Password -- This password will be used for SSH access to the VM aas well as to logon to the Folding@Home client through the remote admin.
    • Fah User -- The Fold@Home user to display for statistical purposes. You can leave this anonymous.
    • Fah Passkey -- The Fold@Home Passkey is used to associate your client(s) with your work. If you do not care about recieving credit, simply leave it blank. If you want a Passkey, sign up here. You can sign up later and re-enter if you like in the web portal.
    • VM Size -- D-Series VM's are chgeaper, but do not have GPU's. N-Series VM's are more expensive, but have avialble GPU's See the pricing chart here for more details.

    Under Terms and Conditions...

    Check the box next to "I agree to the terms and conditions stated above." if you agree.

  4. Click Purchase and wait for the VM to deploy.

  5. Wait about 15 minutes for the the VM to deploy.

  6. Once the virtual machine deploys, you can logon to the web client by browsing to https://dnsname.region.cloudapp.azure.com where dnsname is the the name of the dns entry you entered when you created the VM and region is the shortcode for the Azure region. If you aren't sure, then browse in the Azure Portal to Resource Groups on the left, select the resouce group you created when you deployed the VM, then click on fahclientVM. You'll find the DNS name on the Overview blade.

    DNS Name

  7. You will probably get a messaage about the site not being secure. THIS IS OK! If you click on "Advanced" in Chrome, you can bypass this error.

  8. After bypassing the error, you will be prompted for your credentials. Enter the Admin Username for th Username and the Admin Password for the Password you entered when you created the virtual machine.

    Sign In

  9. If all goes well, you should see the Folding@home web portal.

    Web portal

Advanced Controls (AKA FAHControl)

For more advanced users, you can use the Advanced Controls that are installed with Folding@home. This utility allows you to connect to multiple clients that are running the Fold@home software. You can launch it from the tool tray menu in Windows or from the app from your Start Menu or App Folder on Mac

  1. Click the +Add button.

    Add Client

  2. In Hostname or IP, enter in the dnsname.region.cloudapp.azure.com where dnsname is the the name of the dns entry you entered when you created the VM and region is the shortcode for the Azure region. If you aren't sure, then browse in the Azure Portal to Resource Groups on the left, select the resouce group you created when you deployed the VM, then click on fahclientVM. You'll find the DNS name on the Overview blade.

  3. Enter in the Admin Password for the Password, then click Save.

  4. Once connected, your Fold@home Advanced controls is ready to go.

    Configure Client

fahclient-azure-vm's People

Contributors

scottholden avatar theonemule avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fahclient-azure-vm's Issues

Getting this error

{"telemetryId":"542c53b5-d8ff-46d3-9839-dd639e9e9288","bladeInstanceId":"Blade_f26066f1b6444601b230dc061fcafda7_0_0","galleryItemId":"Microsoft.Template","createBlade":"DeployToAzure","code":"InvalidTemplateDeployment","message":"The template deployment 'Microsoft.Template' is not valid according to the validation procedure. The tracking id is '9be752d1-86cd-4825-9231-8bdc00d66935'. See inner errors for details.","details":[{"code":"QuotaExceeded","message":"Operation could not be completed as it results in exceeding approved Total Regional Cores quota. Additional details - Deployment Model: Resource Manager, Location: eastus, Current Limit: 4, Current Usage: 0, Additional Required: 6, (Minimum) New Limit Required: 6. Submit a request for Quota increase at https://aka.ms/ProdportalCRP/?#create/Microsoft.Support/Parameters/%7B%22subId%22:%2262fd7c5f-cc6e-4ed9-881d-ccd4d83cb1a7%22,%22pesId%22:%2206bfd9d3-516b-d5c6-5802-169c800dec89%22,%22supportTopicId%22:%22e12e3d1d-7fa0-af33-c6d0-3c50df9658a3%22%7D by specifying parameters listed in the ‘Details’ section for deployment to succeed. Please read more about quota limits at https://docs.microsoft.com/en-us/azure/azure-supportability/regional-quota-requests."}]}

Extension script 'fahclient-setup' fails on deployment

Thanks for creating this nice template! First time it worked like a charm, but I had to tear the deployment down and rebuild in another subscription, and this time around, I run into this issue.

I am deploying in an MPN subscription in Azure. The VM SKU I chose is 'Standard NV6', and deployed to 'South Central US'. The deployment issue seems consistent: I've tried this two times, and both times the deployment failed in the exact same way.

Deployment fails at the install script:
image

Detailed error from Azure deployment is pasted in below.

While the https://url does not work (because the certificate is not created of course), the VM can be reached via the Advanced FAH client. It does fold, too, but only on the CPU, not the GPU:

image

The error in the log there is this:

05:40:12:        CPU: Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz
05:40:12:     CPU ID: GenuineIntel Family 6 Model 63 Stepping 2
05:40:12:       CPUs: 6
05:40:12:     Memory: 54.92GiB
05:40:12:Free Memory: 54.20GiB
05:40:12:    Threads: POSIX_THREADS
05:40:12: OS Version: 5.4
05:40:12:Has Battery: false
05:40:12: On Battery: false
05:40:12: UTC Offset: 0
05:40:12:        PID: 2523
05:40:12:        CWD: /var/lib/fahclient
05:40:12:         OS: Linux 5.4.0-1031-azure x86_64
05:40:12:    OS Arch: AMD64
05:40:12:       GPUs: 1
05:40:12:      GPU 0: Bus:0 Slot:0 Func:0 NVIDIA:5 GM204GL [Tesla M60] 4825
05:40:12:       CUDA: Not detected: Failed to open dynamic library 'libcuda.so':
05:40:12:             libcuda.so: cannot open shared object file: No such file or
05:40:12:             directory
05:40:12:     OpenCL: Not detected: Failed to open dynamic library 'libOpenCL.so':
05:40:12:             libOpenCL.so: cannot open shared object file: No such file or
05:40:12:             directory

I looked into this a little bit, and it seems the install.sh bash script starts to error at line 74, when it is trying to create the certificate.
I found this issue in the openssl github, but I'm not sure why this would affect this deployment and not my previous one, as this issue is from 2018?
Also I have no clue why this Standard_NV6 cannot work with the NVIDIA Tesla M60?

Thanks for any help you would be able to offer.

VM has reported a failure when processing extension 'fahclient-setup'. Error message: "Enable failed: failed to execute command: command terminated with exit status=5
[stdout]
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [1399 kB]       
Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [276 kB]        
Get:7 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [166 kB]  
Get:8 http://security.ubuntu.com/ubuntu bionic-security/restricted Translation-en [22.1 kB] 
Get:9 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1079 kB]   
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [241 kB]   
Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [12.9 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/multiverse Translation-en [2964 B] 
Get:13 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [8570 kB]
Get:14 http://archive.ubuntu.com/ubuntu bionic/universe Translation-en [4941 kB]
Get:15 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [151 kB]
Get:16 http://archive.ubuntu.com/ubuntu bionic/multiverse Translation-en [108 kB]
Get:17 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1725 kB]
Get:18 http://archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [367 kB]
Get:19 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [184 kB]
Get:20 http://archive.ubuntu.com/ubuntu bionic-updates/restricted Translation-en [24.6 kB]
Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1681 kB]
Get:22 http://archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [354 kB]
Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [31.9 kB]
Get:24 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse Translation-en [6980 B]
Get:25 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [10.0 kB]
Get:26 http://archive.ubuntu.com/ubuntu bionic-backports/main Translation-en [4764 B]
Get:27 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [10.3 kB]
Get:28 http://archive.ubuntu.com/ubuntu bionic-backports/universe Translation-en [4588 B]
Fetched 21.6 MB in 5s (4795 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
31 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists...
Building dependency tree...
Reading state information...
Package ubuntu-drivers-common is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Selecting previously unselected package fahclient.
(Reading database ... 76630 files and directories currently installed.)
Preparing to unpack latest.deb ...
Adding system user fahclient...done
Unpacking fahclient (7.6.21) ...
Setting up fahclient (7.6.21) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.42) ...
Processing triggers for mime-support (3.60ubuntu1) ...

[stderr]
 .......... .......... .......... .......... 40% 117M 0s
 1300K .......... .......... .......... .......... .......... 42% 106M 0s
 1350K .......... .......... .......... .......... .......... 43% 68.9M 0s
 1400K .......... .......... .......... .......... .......... 45% 160M 0s
 1450K .......... .......... .......... .......... .......... 47% 169M 0s
 1500K .......... .......... .......... .......... .......... 48% 108M 0s
 1550K .......... .......... .......... .......... .......... 50% 102M 0s
 1600K .......... .......... .......... .......... .......... 51% 109M 0s
 1650K .......... .......... .......... .......... .......... 53% 986K 0s
 1700K .......... .......... .......... .......... .......... 54% 112M 0s
 1750K .......... .......... .......... .......... .......... 56% 105M 0s
 1800K .......... .......... .......... .......... .......... 58% 104M 0s
 1850K .......... .......... .......... .......... .......... 59% 137M 0s
 1900K .......... .......... .......... .......... .......... 61% 112M 0s
 1950K .......... .......... .......... .......... .......... 62% 93.4M 0s
 2000K .......... .......... .......... .......... .......... 64% 123M 0s
 2050K .......... .......... .......... .......... .......... 65% 87.6M 0s
 2100K .......... .......... .......... .......... .......... 67% 85.1M 0s
 2150K .......... .......... .......... .......... .......... 68% 101M 0s
 2200K .......... .......... .......... .......... .......... 70% 116M 0s
 2250K .......... .......... .......... .......... .......... 72% 112M 0s
 2300K .......... .......... .......... .......... .......... 73% 126M 0s
 2350K .......... .......... .......... .......... .......... 75% 90.1M 0s
 2400K .......... .......... .......... .......... .......... 76% 113M 0s
 2450K .......... .......... .......... .......... .......... 78% 119M 0s
 2500K .......... .......... .......... .......... .......... 79% 119M 0s
 2550K .......... .......... .......... .......... .......... 81% 110M 0s
 2600K .......... .......... .......... .......... .......... 83% 112M 0s
 2650K .......... .......... .......... .......... .......... 84% 108M 0s
 2700K .......... .......... .......... .......... .......... 86% 74.8M 0s
 2750K .......... .......... .......... .......... .......... 87% 133M 0s
 2800K .......... .......... .......... .......... .......... 89% 119M 0s
 2850K .......... .......... .......... .......... .......... 90% 96.7M 0s
 2900K .......... .......... .......... .......... .......... 92% 98.6M 0s
 2950K .......... .......... .......... .......... .......... 94% 119M 0s
 3000K .......... .......... .......... .......... .......... 95% 93.7M 0s
 3050K .......... .......... .......... .......... .......... 97% 79.6M 0s
 3100K .......... .......... .......... .......... .......... 98% 164M 0s
 3150K .......... .......... .......... ......... 100% 143M=0.4s

2020-10-28 05:40:07 (8.66 MB/s) - ‘latest.deb’ saved [3266064/3266064]


The Folding@home client is now installed

You can access the Web interface by going to:

 https://client.foldingathome.org/

in a browser on this computer.

For information about configuring the Folding@home client for
remote access please see the comments in:

 /etc/fahclient/config.xml


Can't load ./.rnd into RNG
140680492384704:error:2406F079:random number generator:RAND_load_file:Cannot open file:../crypto/rand/randfile.c:88:Filename=./.rnd
Generating a RSA private key
..................................................................................................................................................................................................................++++
.................................................++++
writing new private key to '/etc/nginx/fah.key'
req: Can't open "/etc/nginx/fah.key" for writing, No such file or directory
install.sh: line 76: htpasswd: command not found
install.sh: line 94: /etc/nginx/sites-available/default: No such file or directory
Failed to restart nginx.service: Unit nginx.service not found.
"

More information on troubleshooting is available at https://aka.ms/VMExtensionCSELinuxTroubleshoot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.