Skip to content

Commit 27cf4a0

Browse files
committed
Merge branch 'dev/ci' into 'release/1.2'
Merge dev/ci into release/1.2 Updated the CI testing. See merge request !25
2 parents ec0b06f + 45d1ffb commit 27cf4a0

File tree

7 files changed

+154
-13
lines changed

7 files changed

+154
-13
lines changed

.ci/Dockerfile

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
FROM debian:jessie
2+
3+
USER root
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
6+
#==============================================================================
7+
# BASIC UTILITIES
8+
#==============================================================================
9+
RUN apt-get update -qqy \
10+
&& apt-get -qqy install \
11+
apt-utils\
12+
dialog\
13+
less\
14+
vim\
15+
make\
16+
build-essential\
17+
git\
18+
wget\
19+
man-db\
20+
&& rm -rf /var/lib/apt/lists/*
21+
22+
#==============================================================================
23+
# SLURM
24+
#==============================================================================
25+
RUN apt-get update -qqy \
26+
&& apt-get -qqy install \
27+
slurm-llnl\
28+
munge\
29+
heirloom-mailx\
30+
libslurm-dev\
31+
slurm-drmaa-dev\
32+
&& rm -rf /var/lib/apt/lists/*
33+
34+
# Make necessary directories:
35+
RUN mkdir /var/log/slurm/ /var/run/slurm-llnl/ \
36+
/var/lib/slurm/ /var/lib/slurm/slurmctld/
37+
38+
# Make necessary files:
39+
RUN touch /var/log/slurm/slurmctld.log /var/run/slurm-llnl/slurmctld.pid
40+
41+
# Permissions:
42+
RUN chown -R slurm /var/lib/slurm/ /var/log/slurm/ /var/run/slurm-llnl/
43+
44+
# Configuration file:
45+
ADD slurm.conf /etc/slurm-llnl/slurm.conf
46+
47+
# Slurm setup:
48+
ADD slurm.sh /root/
49+
50+
#==============================================================================
51+
# Python / Python-DRMAA Bindings
52+
#==============================================================================
53+
RUN apt-get update -qqy \
54+
&& apt-get -qqy install \
55+
python-dev\
56+
python-pip\
57+
&& rm -rf /var/lib/apt/lists/*
58+
59+
RUN pip install drmaa
60+
61+
ENV SGE_ROOT=/var/lib/slurm
62+
ENV SGE_CELL=default
63+
ENV DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so
64+
65+
#==============================================================================
66+
# BLAST+
67+
#==============================================================================
68+
RUN apt-get update -qqy \
69+
&& apt-get -qqy install \
70+
blast2\
71+
ncbi-blast+\
72+
&& rm -rf /var/lib/apt/lists/*
73+
74+
#==============================================================================
75+
# NEPTUNE
76+
#==============================================================================
77+
RUN pip install --upgrade pip
78+
79+
RUN pip install numpy
80+
RUN pip install scipy
81+
RUN pip install biopython
82+
83+
RUN pip install tox
84+
85+
#==============================================================================
86+
# FINISH
87+
#==============================================================================
88+
WORKDIR /root/
89+
90+

.ci/run_flake8.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
#!/bin/bash -e
22

3-
printf "setenv = \n DRMAA_LIBRARY_PATH = /usr/lib/gridengine-drmaa/lib/libdrmaa.so.1.0\n" >> tox.ini
4-
printf " SGE_ROOT = /opt/gridengine\n" >> tox.ini
5-
printf " SGE_CELL=default\n" >> tox.ini
6-
printf " SGE_QMASTER_PORT=536\n" >> tox.ini
7-
printf " SGE_EXECD_PORT=537\n" >> tox.ini
8-
printf " SGE_ARCH=linux-x64\n" >> tox.ini
93
tox -r -e flake8

.ci/run_tests.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
#!/bin/bash -e
22

3-
printf "setenv = \n DRMAA_LIBRARY_PATH = /usr/lib/gridengine-drmaa/lib/libdrmaa.so.1.0\n" >> tox.ini
4-
printf " SGE_ROOT = /opt/gridengine\n" >> tox.ini
5-
printf " SGE_CELL=default\n" >> tox.ini
6-
printf " SGE_QMASTER_PORT=536\n" >> tox.ini
7-
printf " SGE_EXECD_PORT=537\n" >> tox.ini
8-
printf " SGE_ARCH=linux-x64\n" >> tox.ini
3+
/root/slurm.sh
4+
95
tox -r

.ci/slurm.conf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# slurm.conf file generated by configurator easy.html.
2+
# Put this file on all nodes of your cluster.
3+
# See the slurm.conf man page for more information.
4+
#
5+
ControlMachine=localhost
6+
#ControlAddr=
7+
#
8+
#MailProg=/bin/mail
9+
MpiDefault=none
10+
#MpiParams=ports=#-#
11+
ProctrackType=proctrack/pgid
12+
ReturnToService=1
13+
SlurmctldPidFile=/var/run/slurm-llnl/slurmctld.pid
14+
#SlurmctldPort=6817
15+
SlurmdPidFile=/var/run/slurm-llnl/slurmd.pid
16+
#SlurmdPort=6818
17+
SlurmdSpoolDir=/var/lib/slurm/slurmd
18+
SlurmUser=slurm
19+
#SlurmdUser=root
20+
StateSaveLocation=/var/lib/slurm/slurmctld
21+
SwitchType=switch/none
22+
TaskPlugin=task/none
23+
#
24+
#
25+
# TIMERS
26+
#KillWait=30
27+
#MinJobAge=300
28+
#SlurmctldTimeout=120
29+
#SlurmdTimeout=300
30+
#
31+
#
32+
# SCHEDULING
33+
FastSchedule=1
34+
SchedulerType=sched/backfill
35+
#SchedulerPort=7321
36+
SelectType=select/linear
37+
#
38+
#
39+
# LOGGING AND ACCOUNTING
40+
AccountingStorageType=accounting_storage/none
41+
ClusterName=cluster
42+
#JobAcctGatherFrequency=30
43+
JobAcctGatherType=jobacct_gather/none
44+
#SlurmctldDebug=3
45+
SlurmctldLogFile=/var/log/slurm/slurmctld.log
46+
#SlurmdDebug=3
47+
SlurmdLogFile=/var/log/slurm/slurmd.log
48+
#
49+
#
50+
# COMPUTE NODES
51+
NodeName=localhost CPUs=4 State=UNKNOWN
52+
PartitionName=debug Nodes=localhost Default=YES MaxTime=INFINITE State=UP

.ci/slurm.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
/etc/init.d/slurmd start
4+
/etc/init.d/munge start
5+
/etc/init.d/slurmctld start
6+

.gitlab-ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1+
image: docker.corefacility.ca:5000/marinier/neptune_deps:latest
2+
13
tests:
24
script: ".ci/run_tests.sh"
5+
36
flake8:
47
script: ".ci/run_flake8.sh"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ commands=
99

1010
[flake8]
1111
ignore=E302, E402
12-
exclude=tests/*,setup.py
12+
exclude=tests/*,setup.py,.tox/*
1313
filename=*.py
1414

1515
[testenv]

0 commit comments

Comments
 (0)