nervosnetwork / ckb-miner

ckb miner for avx2 cpu, avx512 cpu and GPU
MIT License
31 stars 13 forks source link

Docker container #17

Open robcxyz opened 3 years ago

robcxyz commented 3 years ago

I am trying to run a miner in a docker container for testing a mining pool and running into some issues. Not much of rust person so figured I send my questions this way.

The docker file:

FROM rust:1.43 as builder
RUN git clone https://github.com/nervosnetwork/ckb-miner.git /build
RUN apt update && apt install -y ocl-icd-opencl-dev
WORKDIR /build
RUN cargo build --release --features opencl
CMD ["./ckb-miner"]

And getting this error:

   Compiling ckb-types v0.25.0 (https://github.com/nervosnetwork/ckb?tag=v0.25.0#4257647a)
error[E0658]: procedural macros cannot be expanded to expressions
 --> /usr/local/cargo/git/checkouts/ckb-18e696e6b31ffa72/4257647/util/types/src/utilities/difficulty.rs:8:22
  |
8 | const HSPACE: U512 = u512!("0x10000000000000000000000000000000000000000000000000000000000000000");
  |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ckb-types`.

To learn more, run the command again with --verbose.

Any help on this would be very much appreciated.