Skip to content

Commit

Permalink
[CentOS 7] Remove deps from docker image (#994)
Browse files Browse the repository at this point in the history
* Remove antares-deps from docker image

* Fix github/workflows/centos7-release.yml, add docker.yml

* Install ccache

* Publish docker image

* Use tag centos7-simulator-no-deps

* Remove unused argument, clean up
  • Loading branch information
flomnes authored Dec 9, 2022
1 parent beafa69 commit 5a96db5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- doc_generation
container: 'antaresrte/rte-antares:centos7-simulator'
container: 'antaresrte/rte-antares:centos7-simulator-no-deps'
strategy:
matrix:
ortools-xpress: [ON, OFF]
Expand All @@ -48,7 +48,7 @@ jobs:
run: |
git submodule update --init --recursive src/antares-deps src/tests/resources/Antares_Simulator_Tests
- name: Get antares-deps
- name: Download & extract precompiled deps at root
run: |
ANTARES_DEPS_VERSION=$(cut -d'"' -f4 antares-deps-version.json | grep -Ev '\{|\}')
cd /
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish docker images
on:
push:
branches:
- 'docker/*'

jobs:
docker_publish:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@master

- name: Docker file push
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: antaresrte/rte-antares
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: docker
dockerfile: centos7-basic-requirements
cache: true
tags: centos7-simulator-no-deps
8 changes: 3 additions & 5 deletions docker/centos7-basic-requirements
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM centos:7

ARG ANTARES_DEPS_VERSION

# Install requirements : update repo
RUN yum update -y

Expand All @@ -10,13 +8,13 @@ RUN yum install -y epel-release

# Install requirements
RUN yum install -y git redhat-lsb-core make wget centos-release-scl scl-utils rpm-build &&\
yum install -y cmake3 devtoolset-9 ccache &&\
yum install -y rh-git227-git
yum install -y cmake3 devtoolset-9 &&\
yum install -y rh-git227-git ccache

# Install simulator requirements
RUN yum install -y unzip libuuid-devel wxGTK3-devel boost-test boost-devel

# Add python and pip installation
RUN yum install -y python3-pip &&\
python3 -m pip install --upgrade pip &&\
pip3 install pytest pytest-xdist numpy pandas
pip3 install pytest numpy pandas

0 comments on commit 5a96db5

Please sign in to comment.