Anyone interested in a docker container for crypto mining?


lnxd

Crypto Mining Container  

10 members have voted

  1. 1. Do you want to see a crypto mining container on CA

    • Sounds fine to me
      6
    • Too many risks if people aren't careful
      0
    • No because I hate miners
      1
    • I just like voting on things
      2

This poll is closed to new votes

  • Please sign in or register to vote in this poll.
  • Poll closed on 03/23/21 at 11:11 AM

Recommended Posts

Hey guys,

 

Before I do an application for my container to be added to CA, I just wanted to get the general community's opinions on the idea. I wasn't having any luck getting my 5500XT to pass through to a VM without causing a whole bunch of issues, so since LimeTech have kindly gone ahead and included amdgpu driver support in the newer versions of Unraid, I spent the afternoon containerising PhoenixMiner so that the card is at least used for something. Since PhoenixMiner is closed source and a little controversial at the moment, I'm just going to note that it is extremely easy to change it to most other linux supported miners (eg. teamredminer).

 

On my Unraid server personally, there shouldn't be any ill effects of letting it mine. My hard drives are all stored in a cooled enclosure enclosure separate from my PC, I have an overkill RM850x PSU, good airflow, and my server runs off a 1500va PSU. I've also been letting NiceHash mine in an NHOS VM when my other GPU isn't in use now for a few weeks without any noticeable side effects.

 

That said, I'm sure there is a lot of hate here just like everywhere for the mining community, and with the potential risks (eg. users overheating their storage devices in a storage oriented OS) I wanted to leave it up to you guys to decide whether this is something you want to see in CA or not. 

 

I've set the poll to a week just so that I have the opportunity to confirm it doesn't cause unexpected shutdowns, etc. but if anyone needs the code urgently it's on dockerhub. Also please don't judge, it's the first container I've ever made public 😅

 

EDIT: I should note, I know ptrfrll has trex-miner on there, but that only works with Nvidia cards as far as I could tell. This is for AMD cards. 

Edited by lnxd
Link to comment
21 hours ago, SPOautos said:

I'm interested! I have a AMD card that is flakey to pass through to VM and just sits there literally doing nothing.

Looks like we're in the same boat. I did a search on here and there's a couple of posts with people asking for this functionality before they started including the AMD drivers which made it possible. I'm also pleased to see there wasn't any backlash from posting this so I might see if I can apply tonight. 

 

21 hours ago, SPOautos said:

Would it be possible to configure the docker to only utilize a certain percentage of GPU, or would it just run wide open?

It would be possible, and luckily passing /dev/dri doesn't seem to lock the device, the host can still use it and you can even pass it to multiple docker containers. 

 

The good news is that most miners already have arguments/flags that let you limit the GPU, eg. for PhoenixMiner:

-gpow <n>
Lower the GPU usage to n% of maximum (default: 100). If you already use -mi 0 (or other low value) use -li instead. You may specify this option per-GPU.
-li <n>
Another way to lower the GPU usage. Bigger n values mean less GPU utilization; the default is 0. You may specify this option per-GPU.

 

It would be risky to implement a hard limit though, as these mining applications are usually designed to be in charge of the GPU, including OC and GPU reset, etc. and it depends on the skillset of the mining application's developer as to how they implement these functions. Most of these mining apps are closed source which makes it much more time consuming and risky. I think it's best to leave it up to the built-in arguments.

 

After running it for 6 days I haven't had any unexpected behaviour at all so I think it's just about ready 😄

 

Edit: This is now on CA for anyone who is interested, lnxd/PhoenixMiner-AMD

Edited by lnxd
Link to comment
23 hours ago, lnxd said:

Looks like we're in the same boat. I did a search on here and there's a couple of posts with people asking for this functionality before they started including the AMD drivers which made it possible. I'm also pleased to see there wasn't any backlash from posting this so I might see if I can apply tonight. 

 

It would be possible, and luckily passing /dev/dri doesn't seem to lock the device, the host can still use it and you can even pass it to multiple docker containers. 

 

The good news is that most miners already have arguments/flags that let you limit the GPU, eg. for PhoenixMiner:


-gpow <n>
Lower the GPU usage to n% of maximum (default: 100). If you already use -mi 0 (or other low value) use -li instead. You may specify this option per-GPU.
-li <n>
Another way to lower the GPU usage. Bigger n values mean less GPU utilization; the default is 0. You may specify this option per-GPU.

 

It would be risky to implement a hard limit though, as these mining applications are usually designed to be in charge of the GPU, including OC and GPU reset, etc. and it depends on the skillset of the mining application's developer as to how they implement these functions. Most of these mining apps are closed source which makes it much more time consuming and risky. I think it's best to leave it up to the built-in arguments.

 

After running it for 6 days I haven't had any unexpected behaviour at all so I think it's just about ready 😄

 

Edit: This is now on CA for anyone who is interested, lnxd/PhoenixMiner-AMD

 

Why would anyone not want a mining app in CA? I'm not part of the mining 'community' and dont know much about it....is there some kind of major drawback?

Link to comment
34 minutes ago, SPOautos said:

is there some kind of major drawback?

Since the desired end result is the full throttle usage of resources, it can greatly increase electrical usage, heat output, and possibly reduce the life of your equipment if those factors aren't properly accounted for.

 

However, that doesn't mean people don't WANT mining apps in CA, more likely it's just not typically a good candidate for a container since it requires exclusive full access to a fast current video card, which isn't normally a container requirement or even a consideration.

Link to comment
14 minutes ago, jonathanm said:

Since the desired end result is the full throttle usage of resources, it can greatly increase electrical usage, heat output, and possibly reduce the life of your equipment if those factors aren't properly accounted for.

 

However, that doesn't mean people don't WANT mining apps in CA, more likely it's just not typically a good candidate for a container since it requires exclusive full access to a fast current video card, which isn't normally a container requirement or even a consideration.

 

^^^ This was exactly my reasoning when posting the poll.

 

That said, it served its purpose and it's on CA now if anyone is interested. Support thread and instructions are here.

Link to comment
  • 6 months later...

@lnxd, this discussion thread might be old, but I don't want to ask question and clutter the phoenixminer docker support thread, which works awesome by the way. Thank you.

 

Do you have any additional plan to dockerize other mining software like teamredminer, nbminer, etc?

I might be thinking too much ahead, but I am wondering about what altcoin to mine after ethereum switch over to PoS.

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.