-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathturboseti_container.def
55 lines (46 loc) · 1.85 KB
/
turboseti_container.def
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Bootstrap: library
From: ubuntu:18.04
%environment
# Export environment variables here. The following required for CUDA:
export PATH=/usr/local/cuda-10.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
%post
apt-get -y install build-essential
apt-get -y install python3-dev
apt-get -y install python3-distutils
apt-get -y install git
apt-get -y install curl
apt-get -y install wget
apt-get -y install software-properties-common
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
# Install some dependencies first
pip install numpy
pip install cython
python3 -m pip install -U "dask[bag]"
# Blimpy (latest)
python3 -m pip install -U https://github.com/UCBerkeleySETI/blimpy/tarball/master
# CUDA
# Install the earliest possible CUDA toolkit to maximise compatibility
# with drivers (see Table 1 here: https://docs.nvidia.com/deploy/cuda-compatibility/index.html)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
add-apt-repository universe
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install cuda -y
# Fix libcublas location issue
ln -s /usr/lib/x86_64-linux-gnu/libcublas* /usr/local/cuda-10.1/lib64/
# CuPy
pip install cupy-cuda101
# TurboSETI (latest)
git clone https://github.com/UCBerkeleySETI/turbo_seti.git
cd turbo_seti
python3 setup.py install
%runscript
# Enable passing arguments into container via commandline
echo "Container Created"
echo "Args: $*"
exec "$@"