mirror of
https://github.com/ANL-CEEESA/RELOG.git
synced 2025-12-05 23:38:52 -06:00
relog-web: Make time limit configurable
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
FROM julia:1.7-buster
|
||||
|
||||
ENV RELOG_TIME_LIMIT_SEC=3600
|
||||
|
||||
# Install Node.js & zip
|
||||
RUN apt-get update -yq && \
|
||||
apt-get -yq install curl gnupg ca-certificates && \
|
||||
@@ -24,4 +26,4 @@ RUN julia --project=/app -e 'using Pkg; Pkg.precompile()'
|
||||
RUN cd /app/relog-web && npm run build
|
||||
|
||||
WORKDIR /app
|
||||
CMD julia --project=/app -e 'import RELOG; RELOG.web("0.0.0.0")'
|
||||
CMD julia --project=/app -e 'import RELOG; RELOG.web("0.0.0.0")'
|
||||
|
||||
11
Makefile
11
Makefile
@@ -1,4 +1,5 @@
|
||||
VERSION := 0.5
|
||||
PKG := ghcr.io/anl-ceeesa/relog-web
|
||||
|
||||
clean:
|
||||
rm -rfv build Manifest.toml test/Manifest.toml deps/formatter/build deps/formatter/Manifest.toml
|
||||
@@ -8,7 +9,15 @@ docs:
|
||||
rsync -avP --delete-after docs/build/ ../docs/$(VERSION)/
|
||||
|
||||
docker-build:
|
||||
docker build --tag relog-web:$(VERSION) .
|
||||
docker build --tag $(PKG):$(VERSION) .
|
||||
docker build --tag $(PKG):latest .
|
||||
|
||||
docker-push:
|
||||
docker push $(PKG):$(VERSION)
|
||||
docker push $(PKG):latest
|
||||
|
||||
docker-run:
|
||||
docker run -it --rm --name relog --volume $(PWD)/jobs:/app/jobs --publish 8000:8080 $(PKG):$(VERSION)
|
||||
|
||||
format:
|
||||
cd deps/formatter; ../../juliaw format.jl
|
||||
|
||||
@@ -11,7 +11,7 @@ function solve(root, filename)
|
||||
ref_file = "$root/$filename"
|
||||
optimizer = optimizer_with_attributes(
|
||||
Cbc.Optimizer,
|
||||
"seconds" => 900,
|
||||
"seconds" => parse(Int, ENV["RELOG_TIME_LIMIT_SEC"]),
|
||||
)
|
||||
ref_solution, ref_model = RELOG.solve(
|
||||
ref_file,
|
||||
|
||||
Reference in New Issue
Block a user