docker-cplex

IBM ILOG CPLEX deployment with Docker

https://github.com/victorskl/docker-cplex

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.4%) to scientific vocabulary
Last synced: 7 months ago · JSON representation ·

Repository

IBM ILOG CPLEX deployment with Docker

Basic Info
  • Host: GitHub
  • Owner: victorskl
  • License: mit
  • Language: Java
  • Default Branch: main
  • Size: 7.81 KB
Statistics
  • Stars: 13
  • Watchers: 3
  • Forks: 7
  • Open Issues: 0
  • Releases: 1
Created about 8 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

docker-cplex

DOI

IBM ILOG CPLEX deployment with Docker. The demo Java code to use the CPLEX through Concert API Technology. This will end up the embedding use on CPLEX runtime component.

On Local Development

``` cd src javac -cp .:/Applications/CPLEXStudio128/cplex/lib/cplex.jar HelloCplex.java java -Djava.library.path=/Applications/CPLEXStudio128/cplex/bin/x86-64osx -cp .:/Applications/CPLEXStudio128/cplex/lib/cplex.jar HelloCplex

Press CTRL+C to terminate ```

  • Example output as follow: ``` Tried aggregator 1 time. LP Presolve eliminated 1 rows and 3 columns. All rows and columns eliminated. Presolve time = 0.00 sec. (0.00 ticks) Solution is: Optimal Objective Value: 0.0

Tried aggregator 1 time. No LP presolve or aggregator reductions. Presolve time = 0.00 sec. (0.00 ticks)

Iteration log . . . Iteration: 1 Dual objective = 0.600000 Solution is: Optimal Objective Value: 0.6599999999999999

Solutions: x: 3.0 y: 2.0

Reduced cost of x: 0.0 Reduced cost of y: 0.0

Dual of cons01: 0.0017500000000000003 Dual of cons02: -0.0 Dual of cons03: 0.0014999999999999996 ```

On Docker Deployment

Build CPLEX JRE Docker Image

  • The docker container image will be Debian based openjdk:8-jre.

  • Copy the downloaded CPLEX Linux installer cplex_studio128.linux-x86-64.bin to the same location with cplex/Dockerfile.

tree cplex cplex ├── Dockerfile ├── cplex_studio128.linux-x86-64.bin └── response.properties

  • Build the image:

cd cplex docker image build -t cplex:12.8 -t cplex:12.8.0 . docker images|grep cplex cplex 12.8 3b473e7d9ec3 About a minute ago 3.43GB cplex 12.8.0 3b473e7d9ec3 About a minute ago 3.43GB

  • (Optional) Publish to private docker image registry:

``` docker tag cplex:12.8 docker-image-registry.com/namespace/cplex:12.8 docker tag cplex:12.8.0 docker-image-registry.com/namespace/cplex:12.8.0

docker push docker-image-registry.com/namespace/cplex:12.8 docker push docker-image-registry.com/namespace/cplex:12.8.0 ```

Build Sample Java App

  • Make sure to compile the HelloCplex.java. This is on macOS. Otherwise adjust the classpath. javac -cp .:/Applications/CPLEX_Studio128/cplex/lib/cplex.jar src/HelloCplex.java

  • Once ready, build the docker image. docker build -t dev_tusk .

  • Then run the container using the image. docker run -it --rm --name tusk dev_tusk

  • Open another terminal and observe into the container. ``` docker images devtusk docker exec -it tusk bash ls -l ls -l /opt/ibm/ILOG/CPLEXStudio128/ ls -l /opt/ibm/ILOG/CPLEXStudio128/cplex/lib/ ls -l /opt/ibm/ILOG/CPLEXStudio128/cplex/bin/x86-64_linux/

    java -Djava.library.path=/opt/ibm/ILOG/CPLEXStudio128/cplex/bin/x86-64linux -cp .:/opt/ibm/ILOG/CPLEX_Studio128/cplex/lib/cplex.jar HelloCplex

    CTRL+C to terminate

    exit ```

  • To stop the running container: ``` CTRL+C in the container running terminal

    Or from the another terminal, enter:

    docker stop tusk
    

    ```

  • Clean up if desire docker rm tusk docker rmi dev_tusk

Owner

  • Name: Victor San Kho Lin
  • Login: victorskl
  • Kind: user
  • Location: Melbourne
  • Company: University of Melbourne

https://twitter.com/vskl https://keybase.io/victorskl https://www.linkedin.com/in/victorskl https://orcid.org/0000-0002-3940-4729

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Lin"
  given-names: "Victor San Kho"
  orcid: "https://orcid.org/0000-0002-3940-4729"
title: "docker-cplex - IBM ILOG CPLEX deployment with Docker"
version: v201807
doi: 10.5281/zenodo.7240468
date-released: 2022-10-23
url: "https://github.com/victorskl/docker-cplex"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 6
  • Total Committers: 1
  • Avg Commits per committer: 6.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Victor San Kho Lin v****1@g****m 6

Dependencies

Dockerfile docker
  • cplex 12.8 build
cplex/Dockerfile docker
  • openjdk 8-jre build