forked from openhackathons-org/nways_accelerated_programming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nways_Singularity
60 lines (46 loc) · 1.74 KB
/
nways_Singularity
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
56
57
58
59
60
# Copyright (c) 2021 NVIDIA Corporation. All rights reserved.
# To build the singularity container, run: $ singularity build --fakeroot nways_c.simg nways_Singularity
# To copy the content of the container: $ singularity run nways_c.simg cp -rT /labs ~/labs
# To run: $ singularity run --nv nways_c.simg jupyter-lab --notebook-dir=~/labs
# Finally, open http://localhost:8888/
Bootstrap: docker
FROM: nvcr.io/nvidia/nvhpc:23.5-devel-cuda_multi-ubuntu20.04
%environment
export XDG_RUNTIME_DIR=
export PATH="$PATH:/usr/local/bin:/opt/anaconda3/bin:/usr/bin"
%post
build_tmp=$(mktemp -d) && cd ${build_tmp}
apt-get -y update
apt-get -y dist-upgrade
DEBIAN_FRONTEND=noninteractive apt-get -yq install --no-install-recommends \
m4 vim-nox emacs-nox nano zip\
python3-pip python3-setuptools git-core inotify-tools \
curl git-lfs \
build-essential libtbb-dev
rm -rf /var/lib/apt/cache/*
pip3 install --upgrade pip
pip3 install gdown
apt-get update -y
apt-get -y install git nvidia-modprobe
pip3 install jupyterlab
pip3 install ipywidgets
apt-get install --no-install-recommends -y build-essential
python3 /labs/_common/dataset.py
apt-get update -y
apt-get install --no-install-recommends -y build-essential
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/anaconda3
rm Miniconda3-latest-Linux-x86_64.sh
cd /
rm -rf ${build_tmp}
%files
_basic/openacc/ /labs/openacc
_basic/openmp/ /labs/openmp
_basic/_common/ /labs/_common
_basic/iso/ /labs/iso
_basic/cuda/ /labs/cuda
_basic/_start_nways.ipynb /labs
%runscript
"$@"
%labels
AUTHOR mozhgank