Skip to content

Commit

Permalink
Replacing ethminer w/ nsfminer (#10)
Browse files Browse the repository at this point in the history
* Replacing ethminer w/ nsfminer

* Making image backwards compatible

* changelog
  • Loading branch information
onelapahead authored Jan 25, 2021
1 parent e9b7823 commit cfb4fbf
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/miner-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
- name: build and test
run: |
docker build . -t ghcr.io/hfuss/miner:${{ steps.versions.outputs.dirty-version }}
docker run -i ghcr.io/hfuss/miner:${{ steps.versions.outputs.dirty-version }} 'nsfminer --help'
docker run -i ghcr.io/hfuss/miner:${{ steps.versions.outputs.dirty-version }} 'ethminer --help'
docker push ghcr.io/hfuss/miner:${{ steps.versions.outputs.dirty-version }}
working-directory: miner
Expand Down
9 changes: 9 additions & 0 deletions miner/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Dependencies
- ...

## [v0.3.0]
### Changed
- Using up-to-date [`nsfminer`](https://github.com/no-fee-ethereum-mining/nsfminer) instead of [`ethminer`](https://github.com/ethereum-mining/ethminer)

### Dependencies
- Base image `docker.io/nvidia/cuda:11.2-devel-ubuntu18.04`
- New Ethereum miner [`https://github.com/no-fee-ethereum-mining/[email protected]`](https://github.com/no-fee-ethereum-mining/nsfminer/releases/tag/v1.2.4)


## [v0.2.1]
### Changed
- API server listens on all interfaces in read-only mode
Expand Down
13 changes: 6 additions & 7 deletions miner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/nvidia/cuda:11.1-devel-ubuntu18.04 as base
FROM docker.io/nvidia/cuda:11.2.0-devel-ubuntu18.04 as base
LABEL [email protected]
LABEL org.opencontainers.image.source=https://github.com/hfuss/ethernetes

Expand All @@ -10,16 +10,15 @@ RUN mkdir /ethminer
WORKDIR /ethminer

RUN apt-get install -y curl \
&& curl -sL -o ethminer.tgz https://github.com/ethereum-mining/ethminer/releases/download/v0.19.0-alpha.0/ethminer-0.19.0-alpha.0-cuda-8-linux-x86_64.tar.gz \
&& curl -sL -o ethminer.tgz https://github.com/no-fee-ethereum-mining/nsfminer/releases/download/v1.2.4/nsfminer_1.2.4-ubuntu_18.04-cuda_11.2-opencl.tgz \
&& tar -xzvf ethminer.tgz \
&& mv bin/ethminer /usr/local/bin/ \
&& mkdir /usr/local/bin/kernels \
&& mv bin/kernels/* /usr/local/bin/kernels/ \
&& mv nsfminer /usr/local/bin/ \
&& rm -rf *

FROM base as final

COPY --from=ethminer /usr/local/bin/ethminer /usr/local/bin/ethminer
COPY --from=ethminer /usr/local/bin/nsfminer /usr/local/bin/nsfminer
RUN ln -sf /usr/local/bin/nsfminer /usr/local/bin/ethminer

# TODO see if these env vars do anything still
ENV GPU_FORCE_64BIT_PTR=0 \
Expand All @@ -34,5 +33,5 @@ ENV GPU_FORCE_64BIT_PTR=0 \
WORKER_ID=rdu-01a

ENTRYPOINT ["sh", "-c"]
CMD ["ethminer -U -P stratum+tls12://${WALLET_ADDRESS}.${WORKER_ID}@${MINE_POOL}:${STRATUM_TLS_PORT} --report-hashrate --api-port -${API_PORT}"]
CMD ["nsfminer -U -P stratum+tls12://${WALLET_ADDRESS}.${WORKER_ID}@${MINE_POOL}:${STRATUM_TLS_PORT} --report-hashrate --api-port -${API_PORT}"]
EXPOSE ${API_PORT}/tcp
2 changes: 1 addition & 1 deletion miner/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.1
0.3.0

0 comments on commit cfb4fbf

Please sign in to comment.