Skip to content

A boilerplate dockerfile for Julia containers with CPLEX, Gurobi and JuMP installed without fuss.

Notifications You must be signed in to change notification settings

sandyspiers/JuMP-CPLEX-Gurobi-Container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JuMIP: Docker Container for JuMP, CPLEX and Gurobi

Creates a docker container with Julia, JuMP, CPLEX & Gurobi installed, all with correct environment variables so CPLEX.jl and Gurobi.jl install without fuss.

Preparation

CPLEX

Obtain a licence and download the linux installer. The file should be something like cplex_studioXXXX.linux_x68_64.bin. Place this file in bin/. bin should then contain the following 2 files,

bin
 - cplex_studioXXX.linux_x68_64.bin
 - cplex_installer.properties

Gurobi

Obtain web service licence (client-only licences don't work for containers). Generate a gurobi.lic licence file and place it in C:/gurobi/ (as recommended (for Windows) here).

JuMIP Dockerimage

The Dockerfile starts by creating a 'mipopt' image with both Cplex and Gurobi installed into the /opt/ directory. We then copy this over to a fresh julia image. The correct environment variables are then set so that CPLEX.jl and Gurobi.jl install correctly (when you eventually want them).

Usage

We can start a REPL session container by using the docker-compose.yml. Note that a volume must be added to transfer across the Gurobi.lic. To keep have code between your local environment, and the REPL container, we add a volume in the docker compose file. Then, to start your REPL in a container, run

docker compose run jumip

If changes have been made to the Project.toml, you may need to force rebuild with

docker compose up --build jumip
docker compose run jumip

About

A boilerplate dockerfile for Julia containers with CPLEX, Gurobi and JuMP installed without fuss.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published