Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • rc-data-science/community-containers/febiostudio
  • firiaye/febio_docker
2 results
Show changes
Commits on Source (16)
default: default:
before_script: before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
interruptible: true interruptible: true
stages: stages:
- pre-build - pre-build
- build - build
get-credentials: variables:
SECURE_FILES_DOWNLOAD_PATH: '.secure'
get-cookie:
stage: pre-build stage: pre-build
image: ubuntu:jammy image: ubuntu:jammy
variables:
SECURE_FILES_DOWNLOAD_PATH: '.secure'
before_script: before_script:
- apt-get update && apt-get upgrade -y && apt-get install curl -y - apt-get update && apt-get upgrade -y && apt-get install curl jq -y
script: script:
- echo "Copying secure file with FeBio login ..." - echo "Copying secure file with FeBio login ..."
- curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash
- export USERNAME=$(grep 'username:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ') - export USERNAME=$(grep 'username:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- export PASSWORD=$(grep 'password:' ${SECURE_FILE_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ') - export PASSWORD=$(grep 'password:' ${SECURE_FILES_DOWNLOAD_PATH}/febio_login.txt | cut -d ':' -f2 | tr -d ' ')
- echo "Extracted username $USERNAME" - export ENCODED_USERNAME=$(printf '%s' "${USERNAME}" | jq -sRr @uri)
- echo "Extracted password $PASSWORD" - export ENCODED_PASSWORD=$(printf '%s' "${PASSWORD}" | jq -sRr @uri)
- curl -c cookies.txt -X POST -d "log=${ENCODED_USERNAME}&pwd=${ENCODED_PASSWORD}&wp-submit=1" "https://febio.org/wp-login.php" -v
artifacts:
paths:
- cookies.txt
expire_in: 5 minutes
build-latest:
stage: build
image: docker:latest
services:
- docker:dind
dependencies:
- get-cookie
script:
- echo "Building and tagging as latest"
- docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:latest .
- docker push $CI_REGISTRY_IMAGE:latest
only:
- main
docker-build: build-version:
stage: build stage: build
image: docker:latest image: docker:latest
services: services:
- docker:dind - docker:dind
dependencies: dependencies:
- get-credentials - get-cookie
script: script:
- echo "Building and tagging as $CI_COMMIT_REF_NAME"
- docker pull $CI_REGISTRY_IMAGE:latest || true - docker pull $CI_REGISTRY_IMAGE:latest || true
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} --cache-from $CI_REGISTRY_IMAGE:latest --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA --tag $CI_REGISTRY_IMAGE:latest . - docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v} .
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA - docker push $CI_REGISTRY_IMAGE:${CI_COMMIT_REF_NAME#v}
- docker push $CI_REGISTRY_IMAGE:latest only:
- tags
- /^v\d+\.\d+$/
\ No newline at end of file
FROM ubuntu:jammy FROM ubuntu:jammy
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ARG USERNAME
ARG PASSWORD
# install curl and download the febio installer first to prevent any site timeout for the cookies
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install curl -y
zip \
curl \ COPY cookies.txt /tmp/cookies.txt
jq \ RUN curl --output /tmp/febio.zip -b /tmp/cookies.txt "https://febio.org/download/12171/?tmstv=1729879260" && \
unzip \ rm /tmp/cookies.txt
RUN apt-get install -y \
binutils \
libgomp1 \
libglu1-mesa \ libglu1-mesa \
libqt5widgets5 \
libqt5gui5 \
libqt5core5a \
libx11-6 \ libx11-6 \
libxtst6 \ libxtst6 \
libxrender1 \ libxrender1 \
...@@ -23,29 +23,30 @@ RUN apt-get update && \ ...@@ -23,29 +23,30 @@ RUN apt-get update && \
libxcb-xinerama0 \ libxcb-xinerama0 \
libxkbcommon-x11-0 \ libxkbcommon-x11-0 \
mesa-utils \ mesa-utils \
openbox \
qt6-base-dev \
x11-apps \ x11-apps \
xorg \ xorg \
openbox \ zip \
libgomp1 \
&& rm -rf /var/lib/apt/lists && rm -rf /var/lib/apt/lists
RUN ENCODED_USERNAME=$(printf '%s' "$USERNAME" | jq -sRr @uri) && \ RUN unzip -p /tmp/febio.zip > /tmp/febio.run && \
ENCODED_PASSWORD=$(printf '%s' "$PASSWORD" | jq -sRr @uri) && \ chmod +x /tmp/febio.run && \
curl -c cookies.txt -X POST -d "log=${ENCODED_USERNAME}&pwd=${ENCODED_PASSWORD}&wp-submit=1" "https://febio.org/wp-login.php" -v && \
curl --output /tmp/febio.zip -b cookies.txt "https://febio.org/download/12171/?tmstv=1729879260" && \
unset USERNAME PASSWORD ENCODED_USERNAME ENCODED_PASSWORD
RUN unzip /tmp/febio.zip && \
chmod +x FEBioStudio_linux-x64_2.7_FEBio_4.7.run && \
rm /tmp/febio.zip rm /tmp/febio.zip
RUN ./FEBioStudio_linux-x64_2.7_FEBio_4.7.run \ RUN /tmp/febio.run \
--mode unattended \ --mode unattended \
--unattendedmodeui minimal \ --unattendedmodeui minimal \
--enable-components comp_febio_sdk --enable-components comp_febio_sdk
RUN rm FEBioStudio_linux-x64_2.7_FEBio_4.7.run && \ RUN rm /tmp/febio.run && \
ln -s /opt/FEBioStudio/bin/FEBioStudio /opt/FEBioStudio && \ ln -s /opt/FEBioStudio/bin/FEBioStudio /usr/bin/FEBioStudio && \
ln -s /opt/FEBioStudio/bin/febio4 /opt/febio4 ln -s /opt/FEBioStudio/bin/febio4 /usr/bin/febio4
# See https://unix.stackexchange.com/a/700599. libQt6Core.so.6 adds a tag that denotes a minimum kernel version required
# to run it and is set to 3.17.0, above Centos7's 3.10.0. This is why the library was never found even within a
# container despite successfully finding other Qt6 libraries. This command removes that tag so Qt6Core will function on
# Linux kernel 3.10.0
RUN strip --remove-section=.note.ABI-tag /opt/FEBioStudio/lib/libQt6Core.so.6
ENTRYPOINT ["FEBioStudio"] ENTRYPOINT ["FEBioStudio"]