summaryrefslogtreecommitdiffstats
path: root/build/buildah-base.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-11 05:29:12 +0100
committerSuren A. Chilingaryan <csa@ipecompute2.ands.kit.edu>2020-11-11 05:29:12 +0100
commitb363c63d44eef05a06f8f7ff7c471ac4392cc4e9 (patch)
treebc95b45f56aed16e3ed005e01a762dad29fad205 /build/buildah-base.sh
parent28190b6d4664508ad8b1cf88a82378b02f487cfa (diff)
downloadccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.gz
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.bz2
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.tar.xz
ccpi-b363c63d44eef05a06f8f7ff7c471ac4392cc4e9.zip
Support for ufo & jupyter notebooks
Diffstat (limited to 'build/buildah-base.sh')
-rw-r--r--build/buildah-base.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/build/buildah-base.sh b/build/buildah-base.sh
new file mode 100644
index 0000000..b656515
--- /dev/null
+++ b/build/buildah-base.sh
@@ -0,0 +1,42 @@
+#! /usr/bin/env bash
+
+set -o errexit
+
+container=$(buildah from nvidia/cuda:10.1-devel-ubuntu18.04)
+
+buildah config --label maintainer="Suren A. Chilingaryan <csa@suren.me>" $container
+buildah config --env LANG="C.UTF-8" --env LC_ALL="C.UTF-8" --env TERM="xterm" $container
+
+buildah run $container ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime
+buildah run $container sh -c 'echo "Europe/London" > /etc/timezone'
+
+buildah run $container sh -c 'echo "ssh:x:101:" >> /etc/group'
+buildah run $container sh -c 'echo "sshd:x:101:101:sshd:/dev/null:/sbin/nologin" >> /etc/passwd'
+buildah run $container sh -c 'echo "messagebus:x:102:" >> /etc/group'
+buildah run $container sh -c 'echo "messagebus:x:102:102:messagebus:/dev/null:/sbin/nologin" >> /etc/passwd'
+buildah run $container sh -c 'echo "rdma:x:103:" >> /etc/group'
+buildah run $container sh -c 'echo "systemd-journal:x:104:" >> /etc/group'
+buildah run $container sh -c 'echo "systemd-network:x:105:" >> /etc/group'
+buildah run $container sh -c 'echo "systemd-network:x:105:105:systemd-network:/dev/null:/sbin/nologin" >> /etc/passwd'
+buildah run $container sh -c 'echo "systemd-resolve:x:106:" >> /etc/group'
+buildah run $container sh -c 'echo "systemd-resolve:x:106:106:systemd-resolve:/dev/null:/sbin/nologin" >> /etc/passwd'
+
+buildah run $container sh -c 'apt-get update --fix-missing && apt-get install -y bash wget bzip2 mc ca-certificates git openssh-server'
+buildah run $container sh -c 'apt-get install -y python3 python3-setuptools python3-pip cython3'
+buildah run $container sh -c 'apt-get install -y cmake make autoconf automake libtool gcc g++ libboost-all-dev'
+buildah run $container sh -c 'apt-get install -y ca-certificates pkg-config gobject-introspection liblapack-dev libjpeg-dev libtiff-dev libglib2.0-dev libjson-glib-dev libopenmpi-dev libhdf5-dev libclfft-dev libgsl-dev libgirepository1.0-dev fftw3-dev zlib1g-dev'
+buildah run $container sh -c 'apt-get install -y python3-dev python3-numpy python-gobject python-tifffile'
+buildah run $container sh -c 'apt-get install -y ocl-icd-opencl-dev clinfo'
+buildah run $container sh -c 'apt-get install -y jupyter-notebook'
+
+buildah run $container sh -c 'update-alternatives --remove python /usr/bin/python2'
+buildah run $container sh -c 'update-alternatives --install /usr/bin/python python /usr/bin/python3 10'
+
+buildah run $container mkdir -p /etc/OpenCL/vendors
+buildah run $container sh -c 'echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd'
+
+buildah copy $container pre-setup /root/pre-setup
+buildah run $container pip3 install -r /root/pre-setup/requirements.txt
+
+buildah copy $container setup /root/setup
+buildah commit --format docker $container pycuda:latest