Skip to content

Commit

Permalink
Use pre-built docker images to speed up CI (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
riedel authored May 23, 2020
1 parent bb89969 commit b2a5ac8
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 24 deletions.
1 change: 1 addition & 0 deletions ci/pbs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function jobqueue_before_install {

# start pbs cluster
cd ./ci/pbs
docker-compose pull
./start-pbs.sh
cd -

Expand Down
4 changes: 3 additions & 1 deletion ci/pbs/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "2"
services:

master:
image: daskdev/dask-jobqueue:pbs
build: .
container_name: pbs_master
hostname: pbs_master
Expand All @@ -11,6 +12,7 @@ services:
command: bash /run-master.sh

slave_one:
image: daskdev/dask-jobqueue:pbs
build: .
container_name: pbs_slave_1
hostname: pbs_slave_1
Expand All @@ -26,6 +28,7 @@ services:
- master

slave_two:
image: daskdev/dask-jobqueue:pbs
build: .
container_name: pbs_slave_2
hostname: pbs_slave_2
Expand All @@ -39,4 +42,3 @@ services:
- PBS_MASTER=pbs_master
depends_on:
- master

2 changes: 2 additions & 0 deletions ci/sge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
function jobqueue_before_install {
docker version
docker-compose version

# start sge cluster
cd ./ci/sge
docker-compose pull
./start-sge.sh
cd -

Expand Down
7 changes: 6 additions & 1 deletion ci/sge/Dockerfile-master → ci/sge/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:14.04
FROM ubuntu:14.04 as base

ENV LANG C.UTF-8

Expand All @@ -14,6 +14,11 @@ RUN conda install -c conda-forge python=$PYTHON_VERSION dask distributed pytest

COPY ./*.sh /
COPY ./*.txt /

FROM base as slave
RUN bash ./setup-slave.sh

FROM base as master
RUN bash ./setup-master.sh

# expose ports
Expand Down
17 changes: 0 additions & 17 deletions ci/sge/Dockerfile-slave

This file was deleted.

11 changes: 7 additions & 4 deletions ci/sge/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: "2.1"
version: "3.4"

services:

master:
image: daskdev/dask-jobqueue:sge
build:
context: .
dockerfile: Dockerfile-master
target: master
args:
PYTHON_VERSION: ${TRAVIS_PYTHON_VERSION:-3.6}
container_name: sge_master
Expand All @@ -16,9 +17,10 @@ services:
command: bash /run-master.sh

slave-one:
image: daskdev/dask-jobqueue:sge-slave
build:
context: .
dockerfile: Dockerfile-slave
target: slave
args:
PYTHON_VERSION: ${TRAVIS_PYTHON_VERSION:-3.6}
container_name: slave_one
Expand All @@ -33,9 +35,10 @@ services:
- master

slave-two:
image: daskdev/dask-jobqueue:sge-slave
build:
context: .
dockerfile: Dockerfile-slave
target: slave
args:
PYTHON_VERSION: ${TRAVIS_PYTHON_VERSION:-3.6}
container_name: slave_two
Expand Down
1 change: 1 addition & 0 deletions ci/slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function jobqueue_before_install {

# start slurm cluster
cd ./ci/slurm
docker-compose pull
./start-slurm.sh
cd -

Expand Down
4 changes: 4 additions & 0 deletions ci/slurm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ services:
common-network:

slurmdbd:
image: daskdev/dask-jobqueue:slurm
build: .
command: ["slurmdbd"]
container_name: slurmdbd
Expand All @@ -32,6 +33,7 @@ services:
common-network:

slurmctld:
image: daskdev/dask-jobqueue:slurm
build: .
command: ["slurmctld"]
container_name: slurmctld
Expand All @@ -53,6 +55,7 @@ services:
- NET_ADMIN

c1:
image: daskdev/dask-jobqueue:slurm
build: .
command: ["slurmd"]
hostname: c1
Expand All @@ -73,6 +76,7 @@ services:
- NET_ADMIN

c2:
image: daskdev/dask-jobqueue:slurm
build: .
command: ["slurmd"]
hostname: c2
Expand Down
2 changes: 1 addition & 1 deletion ci/slurm/start-slurm.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

docker-compose up --build -d
docker-compose up -d

while [ `./register_cluster.sh 2>&1 | grep "sacctmgr: error" | wc -l` -ne 0 ]
do
Expand Down

0 comments on commit b2a5ac8

Please sign in to comment.