-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdockerfile
More file actions
58 lines (42 loc) · 1.75 KB
/
dockerfile
File metadata and controls
58 lines (42 loc) · 1.75 KB
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
# Use a base image with Python and C++ support
FROM python:3.11-buster
# Déclarer les arguments de construction pour les credentials GitHub
ARG GITHUB_USER
ARG GITHUB_TOKEN
# Install system dependencies
RUN sed -i 's|http://deb.debian.org/debian|http://archive.debian.org/debian|g' /etc/apt/sources.list && \
apt-get update && apt-get install -y build-essential git && rm -rf /var/lib/apt/lists/*
# RUN apt-get update && apt-get install -y \
# build-essential \
# git \
# && rm -rf /var/lib/apt/lists/*
RUN pip install cmake --upgrade
# --------------------------------------------------------------------------
# Login to Github with credentials GITHUB_USER and GITHUB_TOKEN
# export GITHUB_USER=fmaerten
# export GITHUB_TOKEN=xxxxxxxxx (see https://github.com/settings/tokens)
# --------------------------------------------------------------------------
RUN git config --global credential.helper store && \
echo "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com" > ~/.git-credentials
# Set up working directory
WORKDIR /lib
RUN echo "=== Current working directory ===" && pwd && ls -la
# Copy the local dataframe library instead of cloning
COPY . /lib/dataframe
# Clone the C++ source repositories
# RUN git clone https://github.com/xaliphostes/dataframe.git && \
# echo "=== After cloning, current directory ===" && pwd && \
# echo "=== Directory contents ===" && ls -la
WORKDIR /lib/dataframe
# Build the C++ library
RUN mkdir build && cd build \
&& cmake .. \
&& make -j12
RUN ctest --output-on-failure --verbose
# Clear credentials (if they were set)
RUN if [ -f ~/.git-credentials ]; then \
rm ~/.git-credentials && \
git config --global --unset credential.helper; \
fi
# Set default command
CMD ["bash"]