-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
206 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
jobs: | ||
docker_publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Docker file push | ||
id: docker_push | ||
uses: elgohr/Publish-Docker-Github-Action@main | ||
with: | ||
name: 13words/antaressystemdeps | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
workdir: docker | ||
dockerfile: AntaresDeps | ||
cache: false | ||
tags: latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM centos:7 | ||
|
||
ENV LANG=en_US.UTF-8 \ | ||
LC_ALL=en_US.UTF-8 \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
VCPKG_ROOT=/vcpkg \ | ||
ORTOOLS_DIR=ortools | ||
|
||
CMD ["/bin/bash"] | ||
|
||
# Install requirements : update repo | ||
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\ | ||
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\ | ||
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo &&\ | ||
yum install -y epel-release &&\ | ||
yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils python3 &&\ | ||
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo &&\ | ||
sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/*.repo &&\ | ||
sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/*.repo | ||
|
||
RUN yum update -y | ||
RUN yum install -y epel-release | ||
RUN yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils rpm-build && \ | ||
yum install -y devtoolset-11 && \ | ||
yum install -y rh-git227-git ccache | ||
RUN yum install -y unzip libuuid-devel wxGTK3-devel | ||
RUN yum install -y python3-pip && python3 -m pip install --upgrade pip && pip3 install pytest numpy pandas | ||
|
||
# Install requirements | ||
RUN rm -rf /var/cache/yum | ||
|
||
RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
# Install CMake | ||
RUN pip3 install cmake==3.28.4 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
FROM antaresrte/antaressystemdeps:latest | ||
|
||
|
||
|
||
CMD ["/bin/bash"] | ||
|
||
RUN mkdir /workspace | ||
|
||
RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/bashrc | ||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
|
||
ARG BRANCH=develop | ||
RUN cd /workspace && \ | ||
git clone https://github.com/BAZ-C/Antares_Simulator.git --branch $BRANCH && \ | ||
cd Antares_Simulator && \ | ||
git submodule update --init vcpkg && ./vcpkg/bootstrap-vcpkg.sh -disableMetrics && \ | ||
export VCPKG_ROOT=/workspace/Antares_Simulator/vcpkg | ||
|
||
|
||
|
||
|
||
RUN ORTOOLS_TAG=$(cat /workspace/Antares_Simulator/ortools_tag) && \ | ||
echo "ORTOOLS_TAG=$ORTOOLS_TAG" && \ | ||
URL_ORTOOLS=https://github.com/rte-france/or-tools-rte/releases/download/$ORTOOLS_TAG/ortools_cxx_centos7_static_sirius.zip && \ | ||
mkdir -p ortools && cd ortools && \ | ||
wget -q -O ortools.zip $URL_ORTOOLS && \ | ||
unzip -q ortools.zip && \ | ||
rm ortools.zip | ||
|
||
WORKDIR /workspace/Antares_Simulator | ||
|
||
RUN source /opt/rh/devtoolset-11/enable && \ | ||
source /opt/rh/rh-git227/enable && \ | ||
cmake -B _build -S src \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_TOOLCHAIN_FILE=/workspace/Antares_Simulator/vcpkg/scripts/buildsystems/vcpkg.cmake \ | ||
-DVCPKG_TARGET_TRIPLET=x64-linux-release \ | ||
-DCMAKE_BUILD_TYPE=Release \ | ||
-DBUILD_TESTING=OFF \ | ||
-DBUILD_TOOLS=ON \ | ||
-DBUILD_UI=OFF \ | ||
-DCMAKE_PREFIX_PATH=/ortools/install | ||
|
||
ARG NPROC=2 | ||
RUN source /opt/rh/devtoolset-11/enable && \ | ||
source /opt/rh/rh-git227/enable && \ | ||
cmake --build _build --config Release -j${NPROC} &&\ | ||
ccache -s | ||
|
||
#Installer .rpm creation | ||
RUN cd _build && \ | ||
cpack -G RPM | ||
|
||
#Solver archive creation | ||
RUN cd _build && \ | ||
cpack -G RPM | ||
|
||
RUN cd _build && \ | ||
cmake --install . --prefix install && \ | ||
pushd . && \ | ||
cd install/bin && \ | ||
tar czf ../../antares-solver_centos7.tar.gz antares-solver libsirius_solver.so && \ | ||
popd && \ | ||
rm -rf install | ||
|
||
#.tar.gz creation | ||
RUN cd _build && \ | ||
cpack -G TGZ |
Submodule vcpkg
updated
6641 files