-
Notifications
You must be signed in to change notification settings - Fork 1
/
singularity
72 lines (49 loc) · 1.91 KB
/
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
61
62
63
64
65
66
67
68
69
Bootstrap: docker
From: ubuntu
%runscript
eval `opam config env`
if [ $# = 0 ] ; then exec bash; else exec "$@"; fi
%environment
HOME=/container
export HOME
PATH="/usr/local/conda/bin:/container/pypy3.5-6.0.0-linux_x86_64-portable/bin:$PATH"
export PATH
%labels
AUTHOR ellisk@mit.edu
%post
apt-get update && apt-get -y install python3 git wget opam m4 libcairo2-dev libzmq3-dev swig graphviz
mkdir /container
chmod 777 /container
HOME=/container
export HOME
opam init -y --auto-setup --root /container/.opam
opam update
opam switch 4.06.1+flambda
eval `opam config env`
opam install -y ppx_jane core re2 yojson vg cairo2 camlimages menhir ocaml-protoc zmq utop jbuilder
#opam install ocp-indent merlin
echo "
#use "topfind";;
#thread;;
#require "core.top";;
#require "core.syntax";;
open Core;;
" >> /container/.ocamlinit
echo 'eval `opam config env`' >> /container/.bashrc
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
chmod +x Miniconda3-latest-Linux-x86_64.sh
./Miniconda3-latest-Linux-x86_64.sh -b -p /usr/local/conda
rm ./Miniconda3-latest-Linux-x86_64.sh
export PATH="/usr/local/conda/bin:$PATH"
conda install -y numpy dill pyzmq matplotlib scipy protobuf scikit-learn
conda install pytorch torchvision -c pytorch
pip install dill sexpdata pygame pycairo cairocffi psutil pypng Box2D-kengz graphviz frozendict pathos
wget https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3.5-6.0.0-linux_x86_64-portable.tar.bz2
tar xjvf pypy3.5-6.0.0-linux_x86_64-portable.tar.bz2
rm pypy3.5-6.0.0-linux_x86_64-portable.tar.bz2
mv pypy3.5-6.0.0-linux_x86_64-portable /container
PATH=/container/pypy3.5-6.0.0-linux_x86_64-portable/bin:$PATH
pypy3 -m ensurepip
pypy3 -m pip install --user vmprof
pypy3 -m pip install --user dill
pypy3 -m pip install --user psutil