Skip to content

Commit 812bdd0

Browse files
authored
Update Github Actions (#151)
* Update Github Actions Workflow and drop support for singularity < 3.7
1 parent 9dde397 commit 812bdd0

File tree

6 files changed

+64
-55
lines changed

6 files changed

+64
-55
lines changed

.github/workflows/run_singularity_versions.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: Test Support for different Singularity Versions
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
types: [ready_for_review]
6+
7+
pull_request_review:
8+
types: [submitted]
9+
10+
push:
11+
branches:
12+
- 'main'
13+
- 'development'
414

515
jobs:
616
Tests:
@@ -10,25 +20,25 @@ jobs:
1020
matrix:
1121
include:
1222
- python-version: 3.7
13-
DISPLAY_NAME: "Singularity Container Examples with S3.5"
23+
DISPLAY_NAME: "Singularity Container Examples with S3.7"
1424
RUN_CONTAINER_EXAMPLES: true
1525
USE_SINGULARITY: false
16-
SINGULARITY_VERSION: "3.5"
26+
SINGULARITY_VERSION: "3.7"
1727
- python-version: 3.7
18-
DISPLAY_NAME: "Singularity Container Examples with S3.6"
28+
DISPLAY_NAME: "Singularity Container Examples with S3.8"
1929
RUN_CONTAINER_EXAMPLES: true
2030
USE_SINGULARITY: false
21-
SINGULARITY_VERSION: "3.6"
31+
SINGULARITY_VERSION: "3.8"
2232
- python-version: 3.7
23-
DISPLAY_NAME: "Singularity Container Examples with S3.7"
33+
DISPLAY_NAME: "Singularity Container Examples with S3.9"
2434
RUN_CONTAINER_EXAMPLES: true
2535
USE_SINGULARITY: false
26-
SINGULARITY_VERSION: "3.7"
36+
SINGULARITY_VERSION: "3.9"
2737
- python-version: 3.7
28-
DISPLAY_NAME: "Singularity Container Examples with S3.8"
38+
DISPLAY_NAME: "Singularity Container Examples with S3.10"
2939
RUN_CONTAINER_EXAMPLES: true
3040
USE_SINGULARITY: false
31-
SINGULARITY_VERSION: "3.8"
41+
SINGULARITY_VERSION: "3.10"
3242

3343
fail-fast: false
3444

.github/workflows/run_tests.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,44 @@ jobs:
1515
DISPLAY_NAME: "Singularity Tests + CODECOV"
1616
RUN_TESTS: true
1717
USE_SINGULARITY: true
18+
SINGULARITY_VERSION: "3.8"
1819
RUN_CODECOV: true
20+
1921
- python-version: 3.7
2022
DISPLAY_NAME: "Codestyle"
2123
RUN_CODESTYLE: true
24+
USE_SINGULARITY: false
25+
2226
- python-version: 3.7
2327
DISPLAY_NAME: "Singularity Container Examples"
2428
RUN_CONTAINER_EXAMPLES: true
2529
USE_SINGULARITY: true
30+
SINGULARITY_VERSION: "3.8"
31+
2632
- python-version: 3.7
2733
DISPLAY_NAME: "Local Examples"
2834
RUN_LOCAL_EXAMPLES: true
2935
USE_SINGULARITY: false
36+
3037
- python-version: 3.8
3138
DISPLAY_NAME: "Singularity Tests"
3239
RUN_TESTS: true
3340
USE_SINGULARITY: true
41+
SINGULARITY_VERSION: "3.8"
42+
3443
- python-version: 3.9
3544
DISPLAY_NAME: "Singularity Tests"
3645
RUN_TESTS: true
3746
USE_SINGULARITY: true
47+
SINGULARITY_VERSION: "3.8"
3848
fail-fast: false
3949

4050
name: Tests ${{ matrix.python-version }} ${{ matrix.DISPLAY_NAME }}
4151

4252
env:
4353
RUN_TESTS: ${{ matrix.RUN_TESTS }}
4454
USE_SINGULARITY: ${{ matrix.USE_SINGULARITY }}
55+
SINGULARITY_VERSION: ${{ matrix.SINGULARITY_VERSION }}
4556
RUN_CODECOV: ${{ matrix.RUN_CODECOV }}
4657
RUN_CODESTYLE: ${{ matrix.RUN_CODESTYLE }}
4758
RUN_CONTAINER_EXAMPLES: ${{ matrix.RUN_CONTAINER_EXAMPLES }}
@@ -58,6 +69,10 @@ jobs:
5869
uses: actions/setup-go@v2
5970
with:
6071
go-version: '1.14.15' # The Go version to download (if necessary) and use.
72+
- name: Set up Singularity
73+
if: matrix.USE_SINGULARITY == true
74+
run: |
75+
chmod +x ci_scripts/install_singularity.sh && source ./ci_scripts/install_singularity.sh
6176
- name: Install dependencies
6277
run: |
6378
python -m pip install --upgrade pip

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ cd HPOBench
5454
pip install .
5555
```
5656

57-
**Note:** This does not install *singularity (version 3.6)*. Please follow the steps described here: [user-guide](https://sylabs.io/guides/3.6/user-guide/quick_start.html#quick-installation-steps).
57+
**Note:** This does not install *singularity (version 3.8)*. Please follow the steps described here: [user-guide](https://sylabs.io/guides/3.8/user-guide/quick_start.html#quick-installation-steps).
5858
If you run into problems, using the most recent singularity version might help: [here](https://singularity.hpcng.org/admin-docs/master/installation.html)
5959

6060
## Containerized Benchmarks
6161

62-
We provide all benchmarks as containerized versions to (i) isolate their dependencies and (ii) keep them reproducible. Our containerized benchmarks do not rely on external dependencies and thus do not change over time. For this, we rely on [Singularity (version 3.6)](https://sylabs.io/guides/3.6/user-guide/) and for now upload all containers to a [gitlab registry](https://gitlab.tf.uni-freiburg.de/muelleph/hpobench-registry/container_registry)
62+
We provide all benchmarks as containerized versions to (i) isolate their dependencies and (ii) keep them reproducible. Our containerized benchmarks do not rely on external dependencies and thus do not change over time. For this, we rely on [Singularity (version 3.8)](https://sylabs.io/guides/3.8/user-guide/) and for now upload all containers to a [gitlab registry](https://gitlab.tf.uni-freiburg.de/muelleph/hpobench-registry/container_registry)
6363

64-
The only other requirements are: [ConfigSpace](https://github.com/automl/ConfigSpace), *scipy* and *numpy*
64+
The only other requirements are: [ConfigSpace](https://github.com/automl/ConfigSpace), *numpy*, *oslo* and *Pyro4*
6565

6666
### Run a Benchmark Locally
6767

@@ -139,10 +139,9 @@ If you use a benchmark in your experiments, please specify the version number of
139139
the used container to ensure reproducibility. When starting an experiment, HPOBench writes automatically these two version numbers to the log.
140140

141141
### Troubleshooting and Further Notes
142-
143142
- **Singularity throws an 'Invalid Image format' exception**
144-
Use a singularity version > 3. For users of the Meta-Cluster in Freiburg, you have to set the following path:
145-
```export PATH=/usr/local/kislurm/singularity-3.5/bin/:$PATH```
143+
Use a singularity version >= 3.8. If you have multiple singularity installations, you have to add the correct singularity version to your $PATH, e.g.
144+
```export PATH=/usr/local/kislurm/singularity-3.8/bin/:$PATH```
146145

147146
- **A Benchmark fails with `SystemError: Could not start an instance of the benchmark. Retried 5 times` but the container
148147
can be started locally with `singularity instance start <pathtocontainer> test`**

ci_scripts/install.sh

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,35 +40,9 @@ else
4040
echo "Skip installing packages for local examples"
4141
fi
4242

43-
if [[ "$USE_SINGULARITY" == "true" ]]; then
44-
echo "Install Singularity"
45-
46-
sudo apt-get update && sudo apt-get install -y \
47-
build-essential \
48-
libssl-dev \
49-
uuid-dev \
50-
libgpgme11-dev \
51-
squashfs-tools \
52-
libseccomp-dev \
53-
wget \
54-
pkg-config \
55-
git \
56-
cryptsetup
57-
58-
export VERSION=3.5.3 && # adjust this as necessary \
59-
wget https://github.com/sylabs/singularity/archive/refs/tags/v${VERSION}.tar.gz && \
60-
tar -xzf v${VERSION}.tar.gz && \
61-
cd singularity-${VERSION}
62-
63-
./mconfig && \
64-
make -C builddir && \
65-
sudo make -C builddir install
66-
67-
cd ..
68-
install_packages="${install_packages}placeholder,"
69-
else
70-
echo "Skip installing Singularity"
71-
fi
43+
# We add a placeholder / No-OP operator. When running the container examples, we don't install any
44+
# additional packages. That causes an error, since `pip install .[]` does not work.
45+
install_packages="${install_packages}NOP,"
7246

7347
# remove the trailing comma
7448
install_packages="$(echo ${install_packages} | sed 's/,*\r*$//')"

ci_scripts/install_singularity.sh

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
22

3-
echo "Install Singularity"
3+
echo "Inside Singularity Installation Script"
44

55
sudo apt-get update && sudo apt-get install -y \
66
build-essential \
@@ -14,21 +14,33 @@ sudo apt-get update && sudo apt-get install -y \
1414
git \
1515
cryptsetup
1616

17-
if [[ "$SINGULARITY_VERSION" == "3.5" ]]; then
18-
export VERSION=3.5.3
19-
elif [[ "$SINGULARITY_VERSION" == "3.6" ]]; then
20-
export VERSION=3.6.4
21-
elif [[ "$SINGULARITY_VERSION" == "3.7" ]]; then
17+
if [[ "$SINGULARITY_VERSION" == "3.7" ]]; then
2218
export VERSION=3.7.3
19+
export FILENAME=singularity-"${VERSION}"
20+
export EXTRACTED_FILENAME=singularity
21+
2322
elif [[ "$SINGULARITY_VERSION" == "3.8" ]]; then
24-
export VERSION=3.8.0
23+
export VERSION=3.8.4
24+
export FILENAME=singularity-ce-"${VERSION}"
25+
export EXTRACTED_FILENAME=singularity-ce-"${VERSION}"
26+
27+
elif [[ "$SINGULARITY_VERSION" == "3.9" ]]; then
28+
export VERSION=3.9.3
29+
export FILENAME=singularity-ce-"${VERSION}"
30+
export EXTRACTED_FILENAME=singularity-ce-"${VERSION}"
31+
32+
elif [[ "$SINGULARITY_VERSION" == "3.10" ]]; then
33+
export VERSION=3.10.0
34+
export FILENAME=singularity-ce-"${VERSION}"
35+
export EXTRACTED_FILENAME=singularity-ce-"${VERSION}"
36+
2537
else
2638
echo "Skip installing Singularity"
2739
fi
2840

29-
wget https://github.com/sylabs/singularity/archive/refs/tags/v${VERSION}.tar.gz && \
30-
tar -xzf v${VERSION}.tar.gz && \
31-
cd singularity-${VERSION} && \
41+
wget https://github.com/sylabs/singularity/releases/download/v"${VERSION}"/"${FILENAME}".tar.gz && \
42+
tar -xzf "${FILENAME}".tar.gz && \
43+
cd "${EXTRACTED_FILENAME}" && \
3244
./mconfig && \
3345
make -C builddir && \
3446
sudo make -C builddir install

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
scipy>=1.4.1
21
numpy>=1.18.1
32
ConfigSpace>=0.4.12
43
Pyro4==4.80

0 commit comments

Comments
 (0)