Dockerfile 1.61 KiB
FROM ubuntu:16.04
ENV LUA_VERSION 5.2.4
ENV LUAROCKS_VERSION 2.4.2
RUN apt-get update && apt-get install -y \
    bc \
    curl \
    g++ \
    gcc \
    git \
    ksh \
    liblua5.2-dev \
    libssh-dev \
    lua5.2 \
    make \
    perl \
    unzip
RUN ln -sf /usr/bin/lua5.2 /usr/bin/lua && \
    ln -sf /usr/bin/luac5.2 /usr/bin/luac
# RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf - && \
#     cd /lua-$LUA_VERSION && \
#     make linux test && \
#     make install && \
#     cd .. && rm /lua-$LUA_VERSION -rf
RUN curl -L http://luarocks.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz | tar xzf - && \
    cd /luarocks-$LUAROCKS_VERSION && \
    ./configure && \
    make build && \
    make install && \
    cd .. && rm -rf /lua-$LUAROCKS_VERSION
RUN mkdir sgarest-daemon && \
    curl -L https://git.tecgraf.puc-rio.br/csbase-dev/sgarest-daemon/-/archive/master/sgarest-daemon-master.tar.gz | tar xzf - -C sgarest-daemon --strip-components 1 && \
    cd sgarest-daemon && \
    luarocks install lua-schema-scm-1.rockspec && \
    luarocks make sga-daemon-scm-1.rockspec && \
    luarocks make sga-exec-scm-1.rockspec && \
    luarocks make sga-driver-slurm-scm-1.rockspec 
WORKDIR /sgad
ARG RUNTIME_DIR
ENV RUNTIME_DIR ${RUNTIME_DIR}
RUN mkdir projects && mkdir algorithms && mkdir logs && mkdir -p ${RUNTIME_DIR}/tmp/sgad/sandbox
RUN cp ../sgarest-daemon/collect_execution_data .
RUN cp ../sgarest-daemon/flowmonitor .
RUN rm -rf ../sgarest-daemon
COPY sgad.sh .
COPY sgad.cfg .
VOLUME /sgad/projects
VOLUME /sgad/algorithms
VOLUME /sgad/logs
ENTRYPOINT ["./sgad.sh"]
# CMD ["sgad.cfg"]