Skip to content

Instantly share code, notes, and snippets.

@mharsch
Created January 24, 2021 16:48
Show Gist options
  • Select an option

  • Save mharsch/f2bb226caa1de91abaa95f28c6d17b7b to your computer and use it in GitHub Desktop.

Select an option

Save mharsch/f2bb226caa1de91abaa95f28c6d17b7b to your computer and use it in GitHub Desktop.
ethminer on ROCm Dockerfile
FROM ubuntu:18.04
LABEL description="ethminer AMD ROCm Container"
ENV API_PORT=3333
COPY ethminer.tar.gz ./ethminer.tar.gz
ARG ROCM_VER=4.0.0
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl \
libnuma-dev \
gnupg \
ca-certificates \
# get ROCm OpenCL runtime packages
&& curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main" | tee /etc/apt/sources.list.d/rocm.list \
&& apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --install-recommends \
rocm-opencl${ROCM_VER} \
&& mkdir -p /ethminer \
&& tar xvfz ethminer.tar.gz -C /ethminer \
&& rm ethminer.tar.gz \
&& apt-get purge --autoremove -y curl \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
# explicitly point FAHClient to the ROCm libOpenCL
ENV LD_LIBRARY_PATH=/opt/rocm-${ROCM_VER}/lib
ENTRYPOINT ["/ethminer/bin/ethminer --opencl --list-devices"]
EXPOSE $API_PORT
#CMD /ethminer/bin/ethminer --opencl --cl-nobin -P stratum1+ssl://$ETH_WALLET.$WORKERNAME@us2.ethermine.org:5555 \
# -P stratum1+ssl://$ETH_WALLET.$WORKERNAME@us1.ethermine.org:5555
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment