Skip to content

Update legacy Flask handler Docker images to Python 3.13#1192

Merged
jeffbl merged 2 commits into
mainfrom
copilot/research-dockerfiles-flask-3-1-3
Apr 14, 2026
Merged

Update legacy Flask handler Docker images to Python 3.13#1192
jeffbl merged 2 commits into
mainfrom
copilot/research-dockerfiles-flask-3-1-3

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

I agree to the current Contributor License Agreement


Required Information

  • I referenced the issue addressed in this PR.
  • I described the changes made and how these address the issue.
  • I described how I tested these changes.

Task addressed: update the low-risk Flask handlers that still used legacy Python 3.9/3.10 Docker bases, while checking whether PyTorch-based Flask services could be safely modernized.

Changes made:

  • Updated these handler images to Python 3.13: handlers/hello-svg-handler, handlers/multistage-diagram-tactile-svg, handlers/photo-tactile-svg, handlers/svg-depth-map, handlers/svg-object-detection, handlers/svg-semantic-seg, and handlers/ocr-handler.
  • Replaced the old package-install steps in the Debian-based handlers with apt-get update plus explicit ca-certificates installation so pip install works reliably on current images.
  • Moved handlers/ocr-handler from python:3.9.5-alpine to python:3.13-slim after validating that the Alpine variant was not building reliably in this environment.
  • Left the ESPnet services unchanged because their current stacks are tied to Python 3.7-era PyTorch images, and a modern PyTorch/Python validation did not prove low-risk or buildable.

Testing performed:

  • Built all seven updated handler Dockerfiles successfully with docker build from the repository root.
  • Verified directly that Flask==3.1.3 does not install on the current ESPnet base images (pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime and pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime) because they bundle Python 3.7.
  • Verified that attempting to install the current services/espnet-tts/requirements.txt on a modern PyTorch 2.7.1 / Python 3.11 image fails during dependency installation, so that modernization was not included in this low-risk PR.

Coding/Commit Requirements

  • I followed applicable coding standards where appropriate (e.g., PEP8)
  • I have not committed any models or other large files.

New Component Checklist (mandatory for new microservices)

  • I have not added a new component in this PR.

Copilot AI requested a review from jeffbl April 14, 2026 20:50
@jeffbl jeffbl marked this pull request as ready for review April 14, 2026 20:59
@jeffbl jeffbl merged commit b973299 into main Apr 14, 2026
14 checks passed
@jeffbl jeffbl deleted the copilot/research-dockerfiles-flask-3-1-3 branch April 14, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants