-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.build
26 lines (22 loc) · 718 Bytes
/
Dockerfile.build
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
# See packaging for various base options
FROM flatironinstitute/triqs:base
ARG APPNAME=clair
COPY requirements.txt /src/$APPNAME/requirements.txt
RUN pip3 install -r /src/$APPNAME/requirements.txt
ARG BUILDUID=983
RUN useradd -u $BUILDUID -m build
ENV SRC=/src \
BUILD=/home/build \
INSTALL=/usr/local \
PYTHONPATH=/usr/local/lib/python$PYTHON_VERSION/site-packages \
CMAKE_PREFIX_PATH=/usr/lib/cmake/$APPNAME
COPY --chown=build . $SRC/$APPNAME
WORKDIR $BUILD/$APPNAME
RUN chown build .
USER build
ARG BUILD_ID
ARG CMAKE_ARGS
ARG NCORES=4
RUN cmake $SRC/$APPNAME -DCMAKE_INSTALL_PREFIX=$INSTALL -DCLANG_OPT="$CXXFLAGS" $CMAKE_ARGS && make -j$NCORES || make -j1 VERBOSE=1
USER root
RUN make install