summaryrefslogtreecommitdiffstats
path: root/scripts/build_xmr-stak_docker
diff options
context:
space:
mode:
authorPetr Ruzicka <petr.ruzicka@gmail.com>2017-11-23 17:11:50 +0100
committerPetr Ruzicka <petr.ruzicka@gmail.com>2017-11-23 17:11:50 +0100
commitd64fbe5fddbc349e642c40a26cd98f0996fc4ef7 (patch)
treec044eb691a3a0d1442e4a390c080e8ad385085d2 /scripts/build_xmr-stak_docker
parent0c67b32c5d7933d46f7fad1624fa87ab6523caa0 (diff)
downloadxmr-stak-d64fbe5fddbc349e642c40a26cd98f0996fc4ef7.zip
xmr-stak-d64fbe5fddbc349e642c40a26cd98f0996fc4ef7.tar.gz
Adding Dockerfile and fixing build_xmr-stak_docker script
Diffstat (limited to 'scripts/build_xmr-stak_docker')
-rwxr-xr-xscripts/build_xmr-stak_docker/build_xmr-stak_docker.sh92
1 files changed, 49 insertions, 43 deletions
diff --git a/scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh b/scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
index e046cb0..540a3f6 100755
--- a/scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
+++ b/scripts/build_xmr-stak_docker/build_xmr-stak_docker.sh
@@ -5,61 +5,64 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
-if [ -d xmr-stak-cpu ]; then
- git -C xmr-stak-cpu clean -fd
+if [ -d xmr-stak ]; then
+ git -C xmr-stak clean -fd
else
- git clone https://github.com/fireice-uk/xmr-stak-cpu.git
+ git clone https://github.com/fireice-uk/xmr-stak.git
fi
########################
-# Fedora 26
+# Fedora 27
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu fedora:26 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak fedora:27 /bin/bash -c "
set -ex ;
dnf install -y -q gcc gcc-c++ hwloc-devel libmicrohttpd-devel libstdc++-static make openssl-devel cmake ;
-cd /xmr-stak-cpu ;
-cmake -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_fedora_26
-git -C xmr-stak-cpu clean -fd
+
+mv xmr-stak/bin/xmr-stak xmr-stak_fedora_27
+git -C xmr-stak clean -fd
########################
# Ubuntu (17.04)
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu ubuntu:17.04 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak ubuntu:17.10 /bin/bash -c "
set -ex ;
apt update -qq ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
-cd /xmr-stak-cpu ;
-cmake -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_17.04
-git -C xmr-stak-cpu clean -fd
+
+mv xmr-stak/bin/xmr-stak xmr-stak_ubuntu_17.10
+git -C xmr-stak clean -fd
########################
# Ubuntu 16.04
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu ubuntu:16.04 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak ubuntu:16.04 /bin/bash -c "
set -ex ;
apt update -qq ;
apt install -y -qq libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev ;
-cd /xmr-stak-cpu ;
-cmake -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_16.04
-git -C xmr-stak-cpu clean -fd
+
+mv xmr-stak/bin/xmr-stak xmr-stak_ubuntu_16.04
+git -C xmr-stak clean -fd
########################
# Ubuntu 14.04
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu ubuntu:14.04 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak ubuntu:14.04 /bin/bash -c "
set -ex ;
apt update -qq ;
apt install -y -qq curl libmicrohttpd-dev libssl-dev libhwloc-dev software-properties-common ;
@@ -67,48 +70,51 @@ add-apt-repository -y ppa:ubuntu-toolchain-r/test ;
apt update -qq ;
apt install -y -qq gcc-7 g++-7 make ;
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 1 --slave /usr/bin/g++ g++ /usr/bin/g++-7 ;
-curl -L https://cmake.org/files/v3.9/cmake-3.9.0.tar.gz | tar -xzf - -C /tmp/ ;
-( cd /tmp/cmake-3.9.0/ && ./configure && make && sudo make install && cd - ) > /dev/null
+curl -L https://cmake.org/files/LatestRelease/cmake-3.10.0.tar.gz | tar -xzf - -C /tmp/ ;
+( cd /tmp/cmake-*/ && ./configure && make && sudo make install && cd - ) > /dev/null
update-alternatives --install /usr/bin/cmake cmake /usr/local/bin/cmake 1 --force ;
-cd /xmr-stak-cpu ;
-cmake -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_ubuntu_14.04
-git -C xmr-stak-cpu clean -fd
+
+mv xmr-stak/bin/xmr-stak xmr-stak_ubuntu_14.04
+git -C xmr-stak clean -fd
########################
# CentOS 7
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu centos:7 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak centos:7 /bin/bash -c "
set -ex ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
scl enable devtoolset-4 - << EOF
-cd /xmr-stak-cpu ;
-cmake3 -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake3 -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
EOF
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_7
-git -C xmr-stak-cpu clean -fd
+
+mv xmr-stak/bin/xmr-stak xmr-stak_centos_7
+git -C xmr-stak clean -fd
########################
# CentOS 6.x
########################
-docker run --rm -it -v $PWD/xmr-stak-cpu:/xmr-stak-cpu centos:6 /bin/bash -c "
+docker run --rm -it -v $PWD/xmr-stak:/xmr-stak centos:6 /bin/bash -c "
set -ex ;
yum install -y -q centos-release-scl epel-release ;
yum install -y -q cmake3 devtoolset-4-gcc* hwloc-devel libmicrohttpd-devel openssl-devel make ;
scl enable devtoolset-4 - << EOF
-cd /xmr-stak-cpu ;
-cmake3 -DCMAKE_LINK_STATIC=ON . ;
-make install ;
+cd /xmr-stak ;
+cmake3 -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=OFF . ;
+make ;
EOF
"
-mv xmr-stak-cpu/bin/xmr-stak-cpu xmr-stak-cpu_centos_6
-git -C xmr-stak-cpu clean -fd
-rm -rf xmr-stak-cpu
+mv xmr-stak/bin/xmr-stak xmr-stak_centos_6
+git -C xmr-stak clean -fd
+
+rm -rf xmr-stak
OpenPOWER on IntegriCloud