mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 00:18:51 -06:00
Make package installable/testable on clean docker image
This commit is contained in:
@@ -4,7 +4,6 @@ authors = ["Alinson S. Xavier <git@axavier.org>"]
|
||||
version = "0.1.0"
|
||||
|
||||
[deps]
|
||||
CPLEX = "a076750e-1247-5638-91d2-ce28b192dca0"
|
||||
Clp = "e2554f3b-3117-50c0-817c-e040a3ddf72d"
|
||||
Glob = "c27321d9-0574-5035-807b-f59d2c89b15c"
|
||||
HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
|
||||
|
||||
3
test/docker/Dockerfile
Normal file
3
test/docker/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM julia:1.9-buster
|
||||
ADD . /app
|
||||
CMD julia --project=/app/test /app/test/docker/run.jl
|
||||
6
test/docker/run.jl
Normal file
6
test/docker/run.jl
Normal file
@@ -0,0 +1,6 @@
|
||||
using Pkg
|
||||
Pkg.develop(path="/app")
|
||||
Pkg.build("MIPLearn")
|
||||
|
||||
using MIPLearnT
|
||||
runtests()
|
||||
BIN
test/fixtures/bell5.h5
vendored
BIN
test/fixtures/bell5.h5
vendored
Binary file not shown.
@@ -3,7 +3,7 @@
|
||||
# Released under the modified BSD license. See COPYING.md for more details.
|
||||
|
||||
using Clp
|
||||
using CPLEX
|
||||
# using CPLEX
|
||||
using HiGHS
|
||||
using JuMP
|
||||
using Test
|
||||
@@ -130,5 +130,5 @@ end
|
||||
function test_bb()
|
||||
@time bb_run("Clp", optimizer_with_attributes(Clp.Optimizer))
|
||||
@time bb_run("HiGHS", optimizer_with_attributes(HiGHS.Optimizer))
|
||||
@time bb_run("CPLEX", optimizer_with_attributes(CPLEX.Optimizer, "CPXPARAM_Threads" => 1))
|
||||
# @time bb_run("CPLEX", optimizer_with_attributes(CPLEX.Optimizer, "CPXPARAM_Threads" => 1))
|
||||
end
|
||||
|
||||
@@ -27,7 +27,7 @@ function runtests()
|
||||
@testset "BB" begin
|
||||
test_bb()
|
||||
end
|
||||
test_cuts_blackbox_cplex()
|
||||
# test_cuts_blackbox_cplex()
|
||||
test_io()
|
||||
test_problems_setcover()
|
||||
test_solvers_jump()
|
||||
|
||||
@@ -6,10 +6,10 @@ function test_usage()
|
||||
LogisticRegression = pyimport("sklearn.linear_model").LogisticRegression
|
||||
|
||||
@debug "Generating data files..."
|
||||
dirname = tempdir()
|
||||
dirname = mktempdir()
|
||||
data = [fixture_setcover_data()]
|
||||
data_filenames = write_pkl_gz(data, dirname)
|
||||
h5_filenames = ["$(f).h5" for f in data_filenames]
|
||||
h5_filenames = [replace(f, ".pkl.gz" => ".h5") for f in data_filenames]
|
||||
|
||||
@debug "Setting up LearningSolver..."
|
||||
solver = LearningSolver(
|
||||
|
||||
Reference in New Issue
Block a user