-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (26 loc) · 885 Bytes
/
Dockerfile
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
# Note: use https://www.fromlatest.io/ for linting Dockerfiles
FROM ubuntu:16.04 AS vw
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
cmake \
git \
build-essential \
libboost-program-options-dev \
libboost-system-dev \
libboost-test-dev \
libboost-thread-dev \
zlib1g-dev \
valgrind \
zlib1g-dev
WORKDIR /opt/vowpal_wabbit
RUN git clone git://github.com/VowpalWabbit/vowpal_wabbit.git . && \
git -c advice.detachedHead=false checkout 170bba585b012db74e7e6949692141bade933c9e
WORKDIR /opt/vowpal_wabbit/build
RUN cmake .. -DSTATIC_LINK_VW=On -DBUILD_TESTS=Off -DCMAKE_BUILD_TYPE=Release
RUN make -j$(cat nprocs.txt) install
RUN ldconfig
WORKDIR /root
COPY main.c .
RUN gcc -c main.c -I/usr/local/include/vowpalwabbit
RUN g++ main.o -o test -lvw_c_wrapper -lvw -lallreduce -pthread -lboost_program_options -lz
CMD ["valgrind", "./test"]