Skip to content

Commit f6d8948

Browse files
authored
Merge pull request #66 from observatorycontrolsystem/fix/update_ortoolkit
Update to latest working ortools with gurobi 12.0.2 and python 3.12
2 parents 345cc66 + 9461fe6 commit f6d8948

5 files changed

Lines changed: 408 additions & 312 deletions

File tree

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
strategy:
1717
matrix:
1818
python-version:
19-
- "3.9"
2019
- "3.10"
2120
- "3.11"
21+
- "3.12"
2222
steps:
2323
- name: Check out repository
2424
uses: actions/checkout@v2

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# syntax = docker/dockerfile:1.4
22

3-
ARG PYTHON_IMAGE_TAG=3.9-slim
4-
ARG GUROBI_VERSION=11.0.1
3+
ARG PYTHON_IMAGE_TAG=3.12-slim
4+
ARG GUROBI_VERSION=12.0.2
55

66

77
FROM alpine as gurobi-src
@@ -69,11 +69,9 @@ RUN --mount=type=cache,target=/root/.cache/pip /usr/local/bin/pip install --upgr
6969
WORKDIR /src
7070

7171
COPY ./README.md ./pyproject.toml ./poetry.lock .
72-
7372
# install python dependencies
7473
RUN --mount=type=cache,target=/root/.cache/pip <<EOT
7574
#!/bin/bash -ex
76-
pip install -r <(poetry export | grep "numpy")
7775
pip install -r <(poetry export)
7876
EOT
7977

adaptive_scheduler/kernel_mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def filter_on_visibility(rgs, visibility_for_resource, downtime_intervals, seein
317317
conf.constraints['min_lunar_distance'],
318318
conf.constraints['max_lunar_phase']))
319319

320-
num_processes = cpu_count() - 1
320+
num_processes = max(cpu_count() - 1, 1)
321321
log.info("computing {} rise sets with {} processes".format(len(rise_sets_to_compute_later.keys()), num_processes))
322322
# now use a thread pool to compute the missing rise_set intervals for a resource and target
323323
if rise_sets_to_compute_later:

0 commit comments

Comments
 (0)