A 2-post collection

Ethereum CUDA Mining with nvidia-docker

Somebody has done quite a good job :

But, if you're using Nvidia's Pascal cards, you're better off using CUDA 8.0 not 7.5 as of the above's Dockerfile says.

So the new Dockerfile should be begin with:

FROM nvidia/cuda:8.0-devel-ubuntu14.04  

But, if you rush to building it now, if you like me, you will find some errors during cmake, here is one of them :

Building NVCC (Device) object libethash-cuda/CMakeFiles/ethash-cuda.dir/  

Fortunately, there are others facing the very same problem as well, here is the thread:

And here is the response from the author of CUDA cpp-ethereum, namely Genoil:

@Cubirez yes ran into that myself too. This was caused by somebody who tried to make copatibility with Fedora work. I'll fix it in the rep later, but for now, add --std=c++11 to the NVCC flags in CMakelists.txt in libethash-cuda folder

So, actually, you have to make some change to the cloned source.

Here, I will change the course of the Dockerfile a bit, so that we can do the change :

git clone  
cd cpp-ethereum/libethash-cuda  
vim CMakeLists.txt  

Change from

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo)  

To, by adding --std=c++11; :

set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS};--std=c++11;--disable-warnings;--ptxas-options=-v;-use_fast_math;-lineinfo)  

Now, to the Dockerfile, instead of cloning we will be copying instead:

COPY cpp-ethereum /cpp-ethereum  
RUN cd cpp-ethereum \  
    && mkdir build \
    && cd build \
    && cmake -DBUNDLE=cudaminer -DCOMPUTE=61 .. \
    && make -j8 \
    && mkdir /data

Note : I added -DCOMPUTE=61 flag because

อ่านต่อ »