-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsingularity_container
76 lines (67 loc) · 2.81 KB
/
singularity_container
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
70
71
72
73
74
75
76
Bootstrap: library
From: ubuntu:20.04
Stage: build
%setup
%environment
export PATH="/root/.local/bin:$PATH"
export POETRY_VIRTUALENVS_PATH=/bs/virtualenvs
export POETRY_HOME=/bs/poetry
export GH_TOKEN=$GH_TOKEN
%post -c /bin/bash
mkdir /bs
export POETRY_VIRTUALENVS_PATH=/bs/virtualenvs
export DEBIAN_FRONTEND=noninteractive
export POETRY_HOME=/bs/poetry
export TZ=Etc/UTC
export GH_TOKEN=$GH_TOKEN
apt-get update && apt-get -y install software-properties-common curl unzip gzip
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null
add-apt-repository ppa:deadsnakes/ppa
apt-get update
apt-get -y install python3-pip python3-wheel git python3.11 python3.11-dev python3.11-venv curl python3.8 python3.8-dev python3.8-venv libc6 gh
curl -sSL https://install.python-poetry.org | python3.11 -
export PATH="/bs/poetry/bin:$PATH"
cd /bs
gh repo clone https://github.com/LeoIV/bounce.git
cd bounce
poetry env use python3.11
poetry install
# download slice localization data
curl -O http://bounce-resources.s3-website-us-east-1.amazonaws.com/slice_localization_data.zip
unzip slice_localization_data.zip && rm slice_localization_data.zip
mv slice_localization_data.csv data/
# download maxsat60 instance
curl -O http://bounce-resources.s3-website-us-east-1.amazonaws.com/wms_crafted.tgz
tar -xzf wms_crafted.tgz && rm wms_crafted.tgz
mv wms_crafted/frb/frb10-6-4.wcnf data/maxsat/
rm -rf wms_crafted
# download maxsat125 instance
curl -O http://bounce-resources.s3-website-us-east-1.amazonaws.com/mse18-new.zip
unzip mse18-new.zip && rm mse18-new.zip
mv mse18-new/cluster-expansion/benchmarks/IS1_5.0.5.0.0.5_softer_periodic.wcnf.gz .
rm -rf mse18-new
gunzip IS1_5.0.5.0.0.5_softer_periodic.wcnf.gz
mv IS1_5.0.5.0.0.5_softer_periodic.wcnf data/maxsat/cluster-expansion-IS1_5.0.5.0.0.5_softer_periodic.wcnf
ls data/maxsat
cd /bs
git clone https://github.com/LeoIV/BenchSuite.git
cd BenchSuite
git checkout no-mujoco
cd data/svm
gzip -d CT_slice_*
cd ../..
poetry env use python3.8
poetry install
%runscript
echo "Container was created"
echo "Arguments received: $*"
bash -c "PATH='/bs/poetry/bin:$PATH' cd /bs/bounce && PATH='/bs/poetry/bin:$PATH' poetry run python3 main.py $*"
%startscript
%test
%labels
Author [email protected]
Version v0.0.1
%help
This is a container for Bounce