Commit 8a0e296a authored by Thomas Phil's avatar Thomas Phil

macosx dockers

parent 54b6b606
......@@ -2,10 +2,19 @@ FROM ubuntu:16.04
MAINTAINER Thomas Phil <thomas@tphil.nl>
ADD https://gitlab.com/bbmri/infra/strongr/repository/rel-1.1/archive.zip /tmp/strongr.zip
ADD config.json /root/.strongr/config.json
ADD config.py /root/.fastr/config.py
ADD addtask /opt/strongr/addtask
ADD queryqueue /opt/strongr/queryqueue
RUN apt-get update && apt-get install -y unzip python2 python2-dev build-base mercurial
RUN apt-get update && apt-get install -y unzip python2.7 python2.7-dev build-essential mercurial python-pip ca-certificates docker.io
RUN python2 -m ensurepip && mkdir -p /opt/strongr && mkdir -p /opt/fastr && unzip -o /tmp/strongr.zip -d /tmp && mv /tmp/strongr-rel*/* /opt/strongr/ && rm -rf /tmp/strongr* && pip install setuptools && pip install -r /opt/strongr/requirements.txt && hg clone https://bitbucket.org/bigr_erasmusmc/fastr /opt/fastr && cd /opt/fastr && hg checkout develop && pip install -e .
RUN chmod +x /opt/strongr/queryqueue && chmod +x /opt/strongr/addtask
RUN mkdir -p /opt/strongr && mkdir -p /opt/fastr && unzip -o /tmp/strongr.zip -d /tmp && mv /tmp/strongr-rel*/* /opt/strongr/ && rm -rf /tmp/strongr* && pip install setuptools && pip install -r /opt/strongr/requirements.txt && hg clone --insecure https://bitbucket.org/bigr_erasmusmc/fastr /opt/fastr && cd /opt/fastr && hg checkout develop && pip install -e .
WORKDIR /opt/fastr
RUN cd /opt/strongr && python app.py d:create
WORKDIR /opt/strongr
CMD ['python', 'app.py', 'r:r']
#!/bin/bash
cd /opt/strongr
python app.py j:a 'bigr/fastr_addints_worker' $1 y $2 $3 | tail -n1
#!/bin/bash
cd /opt/strongr
python app.py j:f | tail -n1
......@@ -26,13 +26,16 @@ class RunJobHandler(AbstractRunJobHandler):
inter_domain_event_factory = Gateways.inter_domain_event_factory()
inter_domain_events_publisher = strongr.core.Core.inter_domain_events_publisher()
config = strongr.core.Core.config()
scratch_path = config.clouddomain.MockCloud.scratch
volumes = ''
env = ''
if command.scratch:
if not os.path.isdir('/tmp/strongr_scratch'):
os.mkdir('/tmp/strongr_scratch', 0700)
if not os.path.isdir(scratch_path):
os.mkdir(scratch_path, 0700)
volumes = '--volume=/tmp/strongr_scratch:/scratch'
volumes = '--volume={}:/scratch'.format(scratch_path)
env = "-e SCRATCH_DIR='/scratch'"
......@@ -67,6 +70,5 @@ class RunJobHandler(AbstractRunJobHandler):
raise Exception('Something went wrong while stopping docker image: {}'.format(cmd))
job_finished_event = inter_domain_event_factory.newJobFinishedEvent(command.job_id, stdout, 0)
inter_domain_events_publisher.publish(job_finished_event)
......@@ -28,6 +28,9 @@ class DefaultsLoader:
'driver': 'MockCloud',
'OpenNebula': {
'salt_config': '/etc/salt'
},
'MockCloud': {
'scratch': '/tmp/strongr_mockcloud_scratch'
}
},
'restdomain': {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment