Jump to content
Capt.Insano

Release: Folding@Home Docker

113 posts in this topic Last Reply

Recommended Posts

Update:23/02/15

If you are updating this container from a prev install, please see this post: http://lime-technology.com/forum/index.php?topic=37729.msg355949#msg355949.

 

 

This is my first crack at anything like this, be gentle!!

 

I have created a container for the Folding@Home Client:

 

http://folding.stanford.edu/

 

Small Extract:

Folding@home (FAH or F@h) is a distributed computing project for disease research that simulates protein folding, computational drug design, and other types of molecular dynamics.

As of today, the project is using the idle resources of personal computers owned by volunteers from all over the world.

 

Help Stanford University scientists studying Alzheimer's, Huntington's, Parkinson's, and many cancers by simply running a piece of software on your computer.

 

 

Folding can be done as part as teams, with Leadersboards on the Folding@Home Homepage. I created "Team UnRAID" for users of this plugin (changeable: see below)

 

My repo is:

 

https://github.com/CaptInsano/docker-containers/tree/templates

 

Add it to your repo list in DockerMan to add this container.

 

The container is based on phusion *.15 as per best practice.

 

Currently the control of the client is done via a config file in /config, The WebUI (Port: 7396) or through the use of FAHControl UI (Windows/OSX/Linux).

 

 

The default config.xml is setup for:

remote access from local network,  ***This will need changing if your IP Range is different that 92.168.1.* ***

medium CPU use on 1 core only

anonymous username,

password: PASSWORD

folding under a team I created called Team UnRAID.

 

Info on options for config.xml can be found here:

 

https://fah-web.stanford.edu/projects/FAHClient/wiki/ClientDifferencesV6ToV7

and

https://fah-web.stanford.edu/projects/FAHClient/wiki/ClientUserGuide

 

After initial run:

 

Stop the container, change your Username and Password (and Team # if your want) in config.xml and then restart the container.

 

FAHControl is provided as a part of the following download:

https://fah.stanford.edu/file-releases/public/release/fah-installer/windows-xp-32bit/v7.4/fah-installer_7.4.4_x86.exe

 

Hope people enjoy this and any advice on improvements would be much appreciated!!

 

Big Thanks to:

 

smdion (My Dockerfile and Container set-up based hugely on his work)

gfjardim (For the great DockerMan)

BRiT (Help fixing some bugs in this Container)

Sparkleyballs (Some streamlining to the container)

 

 

The Capt.

Share this post


Link to post

Awesome been looking for this for a bit.

Share this post


Link to post

Look in the config.xml, the default password in PASSWORD!

 

Should fix it your connection issue.

 

EDIT: You're right about the logs, I am also getting those errors even though I am folding OK. I wasn't earlier. Leave it with me

Share this post


Link to post

Lol....  Yeah, I missed that line in the OP...  Too many beers after work.

Share this post


Link to post

Nice work!

 

Thank You!

 

Any advice on why runit keeps trying to launch FAHClient even when it has already been started? See logs from squid above as example.

Share this post


Link to post

Nice work!

 

Thank You!

 

Any advice on why runit keeps trying to launch FAHClient even when it has already been started? See logs from squid above as example.

I deleted my post because I asked a stupid question and didn't completely read the OP :-\.  But, here's the logs:

 

Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35
Starting fahclient ... FAILED
fahclient seems to be already running with PID 35

Share this post


Link to post

Is it possible the dpkg installer starts the process after it installs it?

Share this post


Link to post

Is it possible the dpkg installer starts the process after it installs it?

 

Currently doing a test build without runit being set up for FAHClient1

Share this post


Link to post

Added better logic to runit script. DPKG -i was not making it run correctly without it.

 

Update enroute, currently pending build on Docker Repo.

 

Keep an eye out for update via DockerMan.

 

Thanks,

The Capt

Share this post


Link to post

P.S. The FAHClient is supposed to run a WebUI on port 7396 also, but I cannot gain access to it and there is no help on the FAH forums.

I can access the webUI no problems on port 7396.  It allows basic control on F@H.  And, it doesn't require F@H to be installed locally.  Granted, you have more controls through F@H Control Advanced if you install it locally, but for basic start / stop / idle control, the WebUI is all you need.

 

Untitled_zpsf531f9b6.png

Share this post


Link to post

P.S. The FAHClient is supposed to run a WebUI on port 7396 also, but I cannot gain access to it and there is no help on the FAH forums.

I can access the webUI no problems on port 7396.  It allows basic control on F@H.  And, it doesn't require F@H to be installed locally.  Granted, you have more controls through F@H Control Advanced if you install it locally, but for basic start / stop / idle control, the WebUI is all you need.

 

You are absolutely right, I must have been having probs with my Cache in my browser while trying to set it up. I will edit all relevant fields now!

 

Thanks

 

EDIT: Click "Reload info" in DockerMan and FoldingAtHome.xml should be updated with WebUi info and link to WebUI

Share this post


Link to post

I had created a user, and just now installed your update, and noticed that the UI has reverted back to anonymous, but config.xml still is showing my username.

Also related, if I change my username via the UI, then config.xml does not get updated with the relevant information.  But, if I stop / start the UI then the updated info is still there.  Not a big deal, but confusing if you're trying to modify something by hand  Nevermind, Notepad++ is playing games with me.

 

EDIT:  It looks like you solved the continually trying to start FAH issue

Share this post


Link to post

Further update to ensure no permission problems with config.xml.

 

***Also updated config.xml with more info for new users: it is functionally the same as previous config.xml***

 

If existing user wants the updated config.xml  they should:

1.stop the container

2.delete their config.xml

3.update and restart the container

4.update their config.xml

 

Remember there is no need to do this if you don't want and it will happen automatically to any new installs.

 

Hopefully that should be all little niggly bugs taken care of!!

 

Today was my first experience with anything like this!! New to Docker, Github, Bash etc etc.!!

 

Anyway, bedtime I have been at this FAR too long!

 

Any futher issues please report.

 

The Capt.

Share this post


Link to post

Alright: Seriously sorry about this!!

 

In updating the config.xm with comments etc. l I left a trailing "/" out of one line, resulting in FAHClint not starting.

 

I have built again and now all is well!!

 

People *MAY* need to delete their config.xml and let the container rebuild it on restart.

 

 

Share this post


Link to post

Alright: Seriously sorry about this!!

 

In updating the config.xm with comments etc. l I left a trailing "/" out of one line, resulting in FAHClint not starting.

 

I have built again and now all is well!!

 

People *MAY* need to delete their config.xml and let the container rebuild it on restart.

Now I can stop banging my head against the wall

Share this post


Link to post

EDIT:

I was able to access, after a couple of updates  ;), from either web or remote.

 

Then I wasn't. Did an update and now docker won't start. Log:

 

root@localhost:# /usr/bin/docker logs --tail=350 FoldingAtHome
*** Running /etc/my_init.d/firstrun.sh...
/etc/my_init.d/firstrun.sh: line 7: syntax error near unexpected token `done'
/etc/my_init.d/firstrun.sh: line 7: ` done'
*** /etc/my_init.d/firstrun.sh failed with status 2

*** Killing all processes...

 

 

Share this post


Link to post

Further update to ensure no permission problems with config.xml.

 

***Also updated config.xml with more info for new users: it is functionally the same as previous config.xml***

 

If existing user wants the updated config.xml  they should:

1.stop the container

2.delete their config.xml

3.update and restart the container

4.update their config.xml

 

Remember there is no need to do this if you don't want and it will happen automatically to any new installs.

 

Hopefully that should be all little niggly bugs taken care of!!

 

Today was my first experience with anything like this!! New to Docker, Github, Bash etc etc.!!

 

Anyway, bedtime I have been at this FAR too long!

 

Any futher issues please report.

 

The Capt.

 

Completely virgin install:

 

root@localhost:# /usr/bin/docker logs --tail=350 FoldingAtHome
*** Running /etc/my_init.d/firstrun.sh...
/etc/my_init.d/firstrun.sh: line 7: syntax error near unexpected token `done'
/etc/my_init.d/firstrun.sh: line 7: ` done'
*** /etc/my_init.d/firstrun.sh failed with status 2

*** Killing all processes...
*** Running /etc/my_init.d/firstrun.sh...
/etc/my_init.d/firstrun.sh: line 7: syntax error near unexpected token `done'
/etc/my_init.d/firstrun.sh: line 7: ` done'
*** /etc/my_init.d/firstrun.sh failed with status 2

*** Killing all processes...

Share this post


Link to post

yeah it turns out that the FAHClient is too slow exiting for  the "docker stop" command so a PID file gets left behind, stoping it from running again after restarting the container.

 

I have to make the container delete any pre-existing fahclient.pid file on boot.

 

...building now

Share this post


Link to post

Here's my problems:

 

- Start the container.  Everything is good.  Change the user from the UI.  Stop the container.  Config.XML does not get updated with the new user information.

- Restart the container.  UI shows the user I changed it to (config.xml does not)

 

Whats the point of the config.xml if it doesn't reflect the most up to date information available?

 

- Stop the container.  Change the user via the config.xml.  Restart the container.  UI says its still the old user

 

Once again, what's the point?

 

- Delete config.xml.  Remove the container and image.  Re-add the container.  Stop The container.  Modify config.xml for a different user.  Restart.  UI shows the updated user.

- Change the user via the UI.  Stop container.  config.xml doesn't reflect the change.  Restart container, and UI still shows the changed user.

 

Its messed up that any change in the UI overrides the config.xml, and could cause alot of confusion as to why things aren't working the way they should be.  I would think (not sure however) that all of the settings operate like this, not just the username.

 

Why not just hide the config.xml completely and do all of the basic config via the UI, or for the more advanced settings through the FAH Client Advanced settings?  But then again as the previous poster stated, the 'allow v' setting might need to change depending upon your network settings.

 

EDIT:  On second thought, since only the team and username are accessible via the UI, just add a comment to the xml that any changes made via the UI override these settings

 

Share this post


Link to post

Here's my problems:

 

- Start the container.  Everything is good.  Change the user from the UI.  Stop the container.  Config.XML does not get updated with the new user information.

- Restart the container.  UI shows the user I changed it to (config.xml does not)

 

Whats the point of the config.xml if it doesn't reflect the most up to date information available?

 

- Stop the container.  Change the user via the config.xml.  Restart the container.  UI says its still the old user

 

Once again, what's the point?

 

- Delete config.xml.  Remove the container and image.  Re-add the container.  Stop The container.  Modify config.xml for a different user.  Restart.  UI shows the updated user.

- Change the user via the UI.  Stop container.  config.xml doesn't reflect the change.  Restart container, and UI still shows the changed user.

 

Its messed up that any change in the UI overrides the config.xml, and could cause alot of confusion as to why things aren't working the way they should be.  I would think (not sure however) that all of the settings operate like this, not just the username.

 

Why not just hide the config.xml completely and do all of the basic config via the UI, or for the more advanced settings through the FAH Client Advanced settings?  But then again as the previous poster stated, the 'allow v' setting might need to change depending upon your network settings.

 

EDIT:  On second thought, since only the team and username are accessible via the UI, just add a comment to the xml that any changes made via the UI override these settings

 

I have a symbolic link between the correct config.xml location (/etc/fahclient/config.xml) to the accessible config.xml location (/config/config.xml) in the firstrun.sh but for some reason the link does not stick.

 

When you do updates via WebUI or Advance Control it updates the /etc/fahclient/config.xml which only sticks around until the contain is updated.

 

 

I need to figure out why the

ln -s /etc/fahclient/config.xml /config/config.xml

is not persistent.

 

I will have another look at it tomorrow, really need some sleep.

Share this post


Link to post

Go to bed then...  BTW, I do love this docker.  Been waiting for it for a bit.

Share this post


Link to post

I have a symbolic link between the correct config.xml location (/etc/fahclient/config.xml) to the accessible config.xml location (/config/config.xml) in the firstrun.sh but for some reason the link does not stick.

 

When you do updates via WebUI or Advance Control it updates the /etc/fahclient/config.xml which only sticks around until the contain is updated.

 

 

I need to figure out why the

ln -s /etc/fahclient/config.xml /config/config.xml

is not persistent.

 

I will have another look at it tomorrow, really need some sleep.

 

Instead of symlinks just correct the name of your mappping. Use /etc/fahclient instead of /config on the container side.  :)

Share this post


Link to post

Thanks for this, after your updates its working great now.

 

I'm having trouble finding config settings to limit the number of CPU cores used. My server is pretty compact and I'd rather not have it running at full chat 24/7. Any tips?

Share this post


Link to post

I'm having trouble finding config settings to limit the number of CPU cores used. My server is pretty compact and I'd rather not have it running at full chat 24/7. Any tips?

 

Have a look here:

 

https://fah-web.stanford.edu/projects/FAHClient/wiki/ClientDifferencesV6ToV7

and

https://fah-web.stanford.edu/projects/FAHClient/wiki/ClientUserGuide

 

It gives a list of options that can be added to the config.xml to set it up as you would like. I will add that link to the OP.

 

@All:

 

I finally figured out the correct mounting and saving of the config.xml. (Thank your BRiT!)

 

Update is now out that fixes it.

 

Both the DockerMan .xml and the container have been updated so hit "Reload Info" on DockerMan prior to re-adding Container.

 

 

Anyway, bumpy ride but hopefully all is well now!!

 

Thanks for being impromptu beta-testers!!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now