-
Notifications
You must be signed in to change notification settings - Fork 2
/
17.40-blockchain.Dockerfile
42 lines (36 loc) · 1.6 KB
/
17.40-blockchain.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM ubuntu:16.04
WORKDIR /tmp
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y --no-install-recommends install ca-certificates curl xz-utils \
&& curl -L -O --referer https://support.amd.com https://www2.ati.com/drivers/linux/beta/ubuntu/amdgpu-pro-17.40-483984.tar.xz \
&& tar -Jxvf amdgpu-pro-17.40-483984.tar.xz \
&& rm amdgpu-pro-17.40-483984.tar.xz \
&& chmod +x ./amdgpu-pro-17.40-483984/amdgpu-pro-install \
&& ./amdgpu-pro-17.40-483984/amdgpu-pro-install -y \
&& apt install -y rocm-amdgpu-pro \
&& rm -r amdgpu-pro-17.40-483984 \
&& apt-get -y remove ca-certificates curl xz-utils \
&& apt-get -y autoremove \
&& apt-get clean autoclean \
&& rm -rf /var/lib/{apt,dpkg,cache,log}
COPY donate-level.patch /tmp
RUN apt-get update \
&& apt-get -y --no-install-recommends install ca-certificates curl build-essential cmake libuv1-dev ocl-icd-opencl-dev opencl-headers git openssl libssl-dev \
&& git clone https://github.com/xmrig/xmrig-amd.git \
&& git -C xmrig-amd apply ../donate-level.patch \
&& cd xmrig-amd \
&& mkdir build \
&& cd build \
&& cmake -DOpenCL_INCLUDE_DIR=/usr/include/CL -DWITH_HTTPD=OFF .. \
&& make \
&& cd ../.. \
&& mv xmrig-amd/build/xmrig-amd /usr/local/bin/xmrig-amd \
&& chmod a+x /usr/local/bin/xmrig-amd \
&& rm -r xmrig-amd \
&& apt-get -y remove ca-certificates curl build-essential cmake libuv1-dev ocl-icd-opencl-dev \
&& apt-get clean autoclean \
&& rm -rf /var/lib/{apt,dpkg,cache,log}
ENTRYPOINT ["xmrig-amd"]
CMD ["-h"]