-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile_torque
executable file
·64 lines (54 loc) · 2.19 KB
/
Dockerfile_torque
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
FROM ubuntu:16.04
MAINTAINER Neil Venables <neil.venables@cruk.manchester.ac.uk>
RUN apt-get update &&\
apt-get update -y &&\
apt-get install build-essential -y &&\
apt-get install git -y &&\
apt-get install libtool m4 automake pkg-config -y &&\
apt-get install libssl-dev libxml2-dev zlib1g-dev libboost-dev pbs-drmaa-dev gperf -y
RUN git clone https://github.com/adaptivecomputing/torque.git -b 6.1.1 /usr/local/6.1.1
WORKDIR /usr/local/6.1.1
RUN ./autogen.sh &&\
./configure --enable-drmaa &&\
make &&\
make install
ENV HOSTNAME master
COPY ./scripts/set_hostname.sh /
# Configure local Torque
RUN ldconfig &&\
/set_hostname.sh &&\
echo "$HOSTNAME" > /var/spool/torque/server_name &&\
echo "y" | pbs_server -t create &&\
sleep 2 &&\
trqauthd &&\
qmgr -c "set server acl_hosts=$HOSTNAME" &&\
qmgr -c "set server scheduling=true" &&\
qmgr -c "create queue batch queue_type=execution" &&\
qmgr -c "set queue batch started=true" &&\
qmgr -c "set queue batch enabled=true" &&\
qmgr -c "set queue batch resources_default.nodes=1" &&\
qmgr -c "set queue batch resources_default.walltime=3600" &&\
qmgr -c "set server default_queue=batch" &&\
qmgr -c "set server keep_completed = 10" &&\
echo "$HOSTNAME np=1" > /var/spool/torque/server_priv/nodes &&\
printf "\$pbsserver $HOSTNAMEt \n\$logevent 255" > /var/spool/torque/mom_priv/config
RUN adduser --disabled-password --gecos '' batchuser
COPY ./scripts/startenv.sh /
RUN apt-get install environment-modules wget unzip default-jre -y
WORKDIR /usr/local/
RUN echo "source /etc/profile.d/modules.sh" >> /root/.bashrc
RUN echo "alias qsub='qsub -P batchuser'" >> /root/.bashrc
RUN wget --no-check-certificate https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda && \
rm Miniconda3-latest-Linux-x86_64.sh
ENV PATH /opt/conda/bin:${PATH}
ENV LANG C.UTF-8
WORKDIR /
COPY setup.py setup.py
RUN pip install -e .
COPY nispat/ nispat
WORKDIR /nispat
COPY test_normative_modeling/ test_normative_modeling
WORKDIR /
RUN chmod -R 777 /nispat/*
ENTRYPOINT /startenv.sh && /bin/bash