Skip to content

Commit

Permalink
#97: refactor dockerfile for ubuntu base image build
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Sep 2, 2024
1 parent f1d9369 commit 795d411
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 110 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pushbasedockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ubuntu_22.04-gcc_11-vtk_9.2.2-py_3.8
- ubuntu_22.04-clang_11-vtk_9.2.2-py_3.8
- ubuntu_22.04-gcc_12-vtk_9.3.0-py_3.8
- ubuntu_24.04-gcc_12-vtk_9.3.1-py_3.8
- ubuntu_24.04-gcc_13-vtk_9.3.1-py_3.8
default: ubuntu_22.04-gcc_12-vtk_9.3.0-py_3.8

jobs:
Expand All @@ -28,7 +28,6 @@ jobs:
run: |
IFS='_-' read -r -a CONFIG <<< "${{ inputs.image }}"
echo "BASE_IMAGE=${CONFIG[0]}:${CONFIG[1]}" >> $GITHUB_ENV
echo "BASE_DOCKERFILE=make-base-${CONFIG[0]}-${CONFIG[1]}.dockerfile" >> $GITHUB_ENV
echo "CC=${CONFIG[2]}-${CONFIG[3]}" >> $GITHUB_ENV
if [[ "${CONFIG[2]}" == "gcc" ]]; then
echo "CXX=g++-${CONFIG[3]}" >> $GITHUB_ENV
Expand Down Expand Up @@ -70,6 +69,6 @@ jobs:
GCOV=${{ env.GCOV }}
VTK_VERSION=${{ env.VTK_VERSION }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
file: ci/docker/${{ env.BASE_DOCKERFILE }}
file: ci/docker/make-base-ubuntu.dockerfile
push: true
tags: "${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_TAG }}"
2 changes: 1 addition & 1 deletion .github/workflows/pushbasedockerimage_tmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ jobs:
GCOV=${{ env.GCOV }}
VTK_VERSION=${{ env.VTK_VERSION }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
file: ci/docker/make-base.dockerfile
file: ci/docker/make-base-ubuntu.dockerfile
push: true
tags: "${{ env.DOCKER_REPOSITORY }}:${{ env.DOCKER_TAG }}"
103 changes: 0 additions & 103 deletions ci/docker/make-base-ubuntu-24.04.dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,16 @@ RUN mkdir -p /opt/src/vtk
RUN git clone --recursive --branch v${VTK_VERSION} https://gitlab.kitware.com/vtk/vtk.git /opt/src/vtk

# Build VTK
# Note: Ubuntu 24.04 currently encounters inner glew build error when OPENGL_HAS_OSMESA is true.
# but successfully build using X.
RUN mkdir -p ${VTK_DIR}
WORKDIR ${VTK_DIR}
RUN if [ "${BASE_IMAGE}" ] cmake \
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_TESTING:BOOL=OFF \
-DVTK_OPENGL_HAS_OSMESA:BOOL=ON \
-DVTK_OPENGL_HAS_OSMESA:BOOL=$([ "${BASE_IMAGE}" == "ubuntu:24.04" ] && echo "OFF" || echo "ON") \
-DVTK_DEFAULT_RENDER_WINDOW_OFFSCREEN:BOOL=ON \
-DVTK_USE_X:BOOL=OFF \
-DVTK_USE_X:BOOL=$([ "${BASE_IMAGE}" == "ubuntu:24.04" ] && echo "ON" || echo "OFF") \
-DVTK_USE_WIN32_OPENGL:BOOL=OFF \
-DVTK_USE_COCOA:BOOL=OFF \
-DVTK_USE_SDL2:BOOL=OFF \
Expand Down

0 comments on commit 795d411

Please sign in to comment.