-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from blevkovych/feat/scipopt-docker
Create public Docker image for SCIPOptSuite
- Loading branch information
Showing
2 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build And Push Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The version of SCIPOptSuite like #.#.#' | ||
required: true | ||
type: number | ||
|
||
env: | ||
IMAGE_NAME: scipoptsuite | ||
REPOSITORY_NAME: scipoptsuite | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set Docker Tags | ||
id: metadata | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ${{ env.REPOSITORY_NAME }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=raw,value=latest | ||
type=raw,value=${{ github.event.inputs.version }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.metadata.outputs.tags }} | ||
build-args: TAG=${{ github.event.inputs.version }} |
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,20 @@ | ||
FROM debian:bullseye-slim | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG TARGETPLATFORM | ||
ARG TAG | ||
|
||
RUN apt-get update && apt-get -y install \ | ||
build-essential \ | ||
libcliquer1 \ | ||
gfortran \ | ||
liblapack3 \ | ||
libopenblas-dev \ | ||
libgsl25 \ | ||
libtbb2 \ | ||
curl | ||
|
||
WORKDIR /tmp | ||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then curl -Lo SCIPOptSuite.deb https://github.com/scipopt/scip/releases/download/$(echo "v${TAG}" | tr -d '.')/SCIPOptSuite-${TAG}-Linux-debian.deb; fi | ||
RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then curl -Lo SCIPOptSuite.deb https://github.com/scipopt/scip/releases/download/$(echo "v${TAG}" | tr -d '.')/SCIPOptSuite-${TAG}-Linux-arm64.deb; fi | ||
RUN dpkg -i SCIPOptSuite.deb && rm SCIPOptSuite.deb |