-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
56 lines (47 loc) · 1.58 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM teeks99/boost-cpp-docker:gcc-11
ENV DEBIAN_FRONTEND=noninteractive
ENV SPLITTER_PATH='/cknots-app/cknots/cpp/src/splitter/'
ENV MINOR_FINDER_PATH='/cknots-app/cknots/cpp/src/minor-finder/'
ENV BIN_PATH='/cknots-app/cknots/cpp/bin/'
COPY requirements/requirements_docker.txt /cknots-app/requirements.txt
COPY cknots /cknots-app/cknots
COPY cknots.py /cknots-app/cknots.py
COPY docker_cknots.sh /cknots-app/docker_cknots.sh
WORKDIR /cknots-app
SHELL ["/bin/bash", "-c"]
# Downloading required software
RUN \
apt update \
&& apt -y install python3.10-venv python3-pip libstdc++6 cmake libboost-program-options-dev\
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Setting up Python
RUN \
python3.10 -m venv /venv \
&& source /venv/bin/activate \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade wheel \
&& pip3 install -r requirements.txt \
&& python3.10 --version
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
# Creating splitter binary
RUN cmake $SPLITTER_PATH \
&& make \
&& mv splitter $BIN_PATH/splitter \
&& rm CMakeCache.txt \
&& rm cmake_install.cmake \
&& rm Makefile \
&& rm -r CMakeFiles
# Creating find-k6-linear binary
RUN cmake $MINOR_FINDER_PATH \
&& make \
&& mv find-k6-linear $BIN_PATH/find-k6-linear \
&& mv find-knots $BIN_PATH/find-knots \
&& mv parse_raw $BIN_PATH/parse_raw \
&& mv path-decomposition $BIN_PATH/path-decomposition \
&& rm CMakeCache.txt \
&& rm cmake_install.cmake \
&& rm Makefile \
&& rm -r CMakeFiles
RUN chmod +x docker_cknots.sh
ENTRYPOINT ["source", "/venv/bin/activate"]