Skip to content

Commit 1411f30

Browse files
committed
merge master and fix conflicts
2 parents e73e631 + 25ea76c commit 1411f30

65 files changed

Lines changed: 2780 additions & 1378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ Give a summary of the key changes
88
- Closes #1
99
- Addresses #2
1010

11+
1112
## Merge Dependencies
1213

13-
- Either: this PR has no merge dependencies, or
14-
- Depends on: ...
14+
Either:
15+
- This PR has no merge dependencies, or
16+
- Depends on: ..., or
1517
- Should be merged before: ...
1618

19+
## Target versions
20+
21+
- OpEn version ...
22+
- opengen version ...
23+
24+
1725
## Checklist
1826

1927
- [ ] API documentation updated

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open-clib/Cargo.lock
4343
/website/node_modules/
4444
/website/yarn.lock
4545
/website/build/
46+
/website/.docusaurus/
4647
!/website/pages/
4748
!/website/static/
4849
!/website/*.js
@@ -73,4 +74,4 @@ open-clib/Cargo.lock
7374
*private*
7475
.DS_Store
7576
/img/
76-
private/
77+
private/

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
Note: This is the main Changelog file for the Rust solver. The Changelog file for the Python interface (`opengen`) can be found in [/open-codegen/CHANGELOG.md](open-codegen/CHANGELOG.md)
99

10+
11+
<!-- ---------------------
12+
v0.11.1
13+
--------------------- -->
14+
## [v0.11.1] - 2026-03-23
15+
16+
17+
### Fixed
18+
19+
- Return best PANOC half-step on early exit (issue #325)
20+
21+
1022
<!-- ---------------------
1123
v0.11.0
1224
--------------------- -->
@@ -330,6 +342,7 @@ This is a breaking API change.
330342
--------------------- -->
331343

332344
<!-- Releases -->
345+
[v0.11.1]: https://github.com/alphaville/optimization-engine/compare/v0.11.0...v0.11.1
333346
[v0.11.0]: https://github.com/alphaville/optimization-engine/compare/v0.10.0...v0.11.0
334347
[v0.10.0]: https://github.com/alphaville/optimization-engine/compare/v0.9.1...v0.10.0
335348
[v0.9.1]: https://github.com/alphaville/optimization-engine/compare/v0.9.0...v0.9.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ homepage = "https://alphaville.github.io/optimization-engine/"
4242
repository = "https://github.com/alphaville/optimization-engine"
4343

4444
# Version of this crate (SemVer)
45-
version = "0.11.0"
45+
version = "0.11.1"
4646

4747
edition = "2018"
4848

docker/CHANGELOG.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Changelog
2+
3+
All notable changes to the Docker image in this directory will be documented in this file.
4+
5+
The format is loosely based on Keep a Changelog and tracks changes to the Dockerfile,
6+
bundled notebooks, and image-facing documentation.
7+
8+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
9+
and this project adheres to [Semantic Versioning](http://semver.org/).
10+
11+
## 0.7.0 - 2026-03-22
12+
13+
### Added
14+
15+
- Added a Rust Jupyter notebook at `docker/notebooks/openrust_basic.ipynb` based on the
16+
OpEn basic Rust example.
17+
- Added a Python Jupyter notebook at `docker/notebooks/python_ocp_1.ipynb` based on the
18+
getting-started optimal control example.
19+
- Added Matplotlib to the image so bundled Python notebooks can plot trajectories.
20+
- Added Rust kernel support in JupyterLab through `evcxr_jupyter`.
21+
22+
### Changed
23+
24+
- Updated the image to bundle Python 3.12 from `python:3.12-slim-bookworm`.
25+
- Switched the interactive environment from the classic Jupyter notebook UI to JupyterLab.
26+
- Moved the example notebook into `docker/notebooks/`.
27+
- Updated `docker/README.md` and `docs/docker.md` to describe the current image layout,
28+
authentication model, kernels, notebook locations, and build flow.
29+
- Documented the Dockerfile/image version separately from the bundled Python package
30+
version.
31+
32+
### Security
33+
34+
- Enabled Jupyter's default token authentication by default instead of disabling auth.
35+
- Upgraded `pip` in both the system Python and virtual environment during the image build.
36+
- Removed the transient `py` package from the virtual environment after installing
37+
`opengen`.
38+
39+
## 0.6.0
40+
41+
### Changed
42+
43+
- Updated the Docker image version from `0.5.0` to `0.6.0`
44+
- Updated Python notebook
45+
46+
## 0.5.0
47+
48+
### Added
49+
50+
- Added maintainer-facing build and publish instructions in `docker/README.md`.
51+
52+
### Changed
53+
54+
- Defined Dockerfile/image version `0.5.0`.
55+
- Bundled `opengen==0.10.0` in the image while keeping the Docker image version distinct.
56+
- Reworked notebook packaging so bundled notebooks are copied from `docker/notebooks/`.
57+

docker/Dockerfile

Lines changed: 49 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,90 @@
1-
# -------- Licence -------------------------------------------------------------
2-
# Dual license: MIT and Apache v2
1+
#
2+
# Dockerfile for OpEn/opengen
3+
# Dockerfile version: 0.7.0
4+
# Bundled Python package: opengen v0.10.0
5+
# Bundled Rust notebook dependency: optimization_engine v0.11.0
6+
# JupyterLab kernels: Python and Rust (Evcxr)
37
#
48
# Copyright (c) 2017 Pantelis Sopasakis and Emil Fresk
5-
# ------------------------------------------------------------------------------
6-
7-
9+
#
10+
#
11+
#
812
# -------- Run Instructions ----------------------------------------------------
913
# Run the docker image and start a terminal to access it by running:
1014
#
11-
# $ docker run -p 8888:8888 -it alphaville/open
15+
# $ docker run -p 127.0.0.1:8888:8888 -it alphaville/open
1216
#
13-
# You will be able to access your Jupyter Notebook at http://localhost:8888/
14-
# without a password. To set a password, read the documentation.
17+
# You will be able to access JupyterLab at http://localhost:8888/lab
18+
# using Jupyter's default token authentication. To set a password, read the
19+
# documentation.
1520
#
16-
# ------------------------------------------------------------------------------
21+
#
22+
23+
FROM python:3.12-slim-bookworm
1724

18-
FROM debian:stable
25+
ARG OPENGEN_VERSION=0.10.0
26+
ARG OPTIMIZATION_ENGINE_CRATE_VERSION=0.11.0
27+
ARG EVCXR_JUPYTER_VERSION=0.21.1
1928

2029
# Labels for the docker image
2130
LABEL maintainer="Pantelis Sopasakis <p.sopasakis@gmail.com>" \
2231
license="MIT license" \
23-
description="Jupyter notebook for Optimization Engine (OpEn)"
32+
description="JupyterLab for Optimization Engine (OpEn) with Python and Rust kernels"
2433

2534
WORKDIR /open
26-
VOLUME /open
2735

28-
# Example Python notebook
29-
COPY example.ipynb /open/
36+
# Example notebook content bundled with the image
37+
COPY notebooks/ /open/notebooks/
3038

31-
ENV PATH="/root/.cargo/bin:${PATH}"
39+
ENV VIRTUAL_ENV=/venv
40+
ENV PATH="${VIRTUAL_ENV}/bin:/root/.cargo/bin:${PATH}"
3241

3342
# These commands are groupped into a separate RUN to faciliate
3443
# caching; it is unlikely that any of the following will change
3544
# in future versions of this docker image
3645
RUN apt-get update -y \
3746
&& apt-get -y --no-install-recommends install \
3847
build-essential \
48+
ca-certificates \
3949
curl \
40-
jupyter-notebook \
41-
python3 \
42-
python3-pip \
43-
python3-setuptools \
44-
python3-venv \
45-
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \
46-
&& cd /; python3 -m venv venv \
47-
&& /bin/bash -c "source /venv/bin/activate && pip install wheel && pip install opengen && pip install jupyter" \
50+
&& curl https://sh.rustup.rs -sSf | bash -s -- -y --profile minimal \
51+
&& rustup component add rust-src \
52+
&& cargo install --locked "evcxr_jupyter@${EVCXR_JUPYTER_VERSION}" \
53+
&& NOTEBOOK_BOOTSTRAP_DIR="$(mktemp -d)" \
54+
&& mkdir -p "${NOTEBOOK_BOOTSTRAP_DIR}/src" \
55+
&& printf '[package]\nname = "open-rust-notebook-bootstrap"\nversion = "0.1.0"\nedition = "2021"\n\n[dependencies]\noptimization_engine = "=%s"\n' "${OPTIMIZATION_ENGINE_CRATE_VERSION}" > "${NOTEBOOK_BOOTSTRAP_DIR}/Cargo.toml" \
56+
&& printf 'fn main() {}\n' > "${NOTEBOOK_BOOTSTRAP_DIR}/src/main.rs" \
57+
&& cargo generate-lockfile --manifest-path "${NOTEBOOK_BOOTSTRAP_DIR}/Cargo.toml" \
58+
&& cargo fetch --locked --manifest-path "${NOTEBOOK_BOOTSTRAP_DIR}/Cargo.toml" \
59+
&& rm -rf "${NOTEBOOK_BOOTSTRAP_DIR}" \
60+
&& python -m pip install --no-cache-dir --upgrade "pip>=26.0.1" \
61+
&& python -m venv "${VIRTUAL_ENV}" \
62+
&& "${VIRTUAL_ENV}/bin/python" -m pip install --no-cache-dir --upgrade "pip>=26.0.1" wheel \
63+
&& "${VIRTUAL_ENV}/bin/python" -m pip install --no-cache-dir "opengen==${OPENGEN_VERSION}" "jupyterlab<5" "matplotlib<4" \
64+
&& JUPYTER_PATH="${VIRTUAL_ENV}/share/jupyter" evcxr_jupyter --install \
65+
&& "${VIRTUAL_ENV}/bin/python" -m pip uninstall -y py \
4866
&& apt-get clean \
4967
&& rm -rf /var/lib/apt/lists/* \
50-
&& echo "source /venv/bin/activate" >> /root/.bashrc
68+
&& echo "source ${VIRTUAL_ENV}/bin/activate" >> /root/.bashrc
69+
70+
VOLUME /open
5171

5272
EXPOSE 8888
5373

5474
# Run the following command every time this docker image
5575
# is executed
56-
COPY start_jupyter_notebook.sh /
57-
RUN ["chmod", "+x", "/start_jupyter_notebook.sh"]
58-
CMD ["/bin/bash", "/start_jupyter_notebook.sh"]
76+
COPY start_jupyter_notebook.sh /usr/local/bin/start_jupyter_notebook.sh
77+
RUN ["chmod", "+x", "/usr/local/bin/start_jupyter_notebook.sh"]
78+
CMD ["/usr/local/bin/start_jupyter_notebook.sh"]
5979

6080

6181

6282
# -------- Build Instructions --------------------------------------------------
6383
# Build the docker image by running (for DEVELOPERS only):
6484
#
65-
# $ docker image build -t alphaville/open .
85+
# $ docker image build -t alphaville/open:0.7.0 .
6686
#
67-
# from within the base directory of this project.
87+
# from within the docker directory of this project.
6888
#
6989
#
7090
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)