Skip to content

Fix: Docker file can't build with python 3.12#320

Open
EnergeticBone wants to merge 2 commits into
rohitg00:mainfrom
EnergeticBone:main
Open

Fix: Docker file can't build with python 3.12#320
EnergeticBone wants to merge 2 commits into
rohitg00:mainfrom
EnergeticBone:main

Conversation

@EnergeticBone

@EnergeticBone EnergeticBone commented Jul 2, 2026

Copy link
Copy Markdown

What this PR does

Fix docker file can not build because of python 3.12

Kind of change

  • New lesson
  • [ X] Fix to an existing lesson
  • Translation
  • New output (prompt, skill, agent, MCP server)
  • Docs / website / tooling

Checklist

  • [ X] Code runs without errors with the listed dependencies
  • No comments in code files (docs explain, code is self-explanatory)
  • Built from scratch first, then shown with a framework (for new lessons)
  • Lesson folder matches LESSON_TEMPLATE.md structure
  • ROADMAP.md row for the lesson is a markdown link ([Name](phases/...)), not bare text
  • One lesson per commit (atomic per-lesson rule)
  • Tested locally / code output matches what docs/en.md claims

Phase / lesson

Phase 0 lesson 7: Docker for AI

Notes for reviewer

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0b137047-a988-4dcb-ab4c-6a7dca68e421

📥 Commits

Reviewing files that changed from the base of the PR and between fe87df5 and 7470bc5.

📒 Files selected for processing (1)
  • phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile
🚧 Files skipped from review as they are similar to previous changes (1)
  • phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile

📝 Walkthrough

Walkthrough

Updates the Dockerfile to install Python 3.12 from deadsnakes, bootstrap pip with get-pip.py, switch install commands to pip, and upgrade the PyTorch wheel versions.

Changes

Dockerfile toolchain update

Layer / File(s) Summary
Python 3.12 install via deadsnakes PPA
phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile
Installs software-properties-common, adds the deadsnakes/ppa repository, installs Python 3.12 and build tools without python3-pip, and clears apt lists.
Pip bootstrap and alternatives
phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile
Runs get-pip.py with python3.12, sets update-alternatives for python and pip, and upgrades pip tooling with pip directly.
PyTorch wheel upgrade and pip switch
phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile
Upgrades torch, torchvision, and torchaudio to newer cu124 wheels and switches the remaining bulk dependency install command to pip.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the Dockerfile build for Python 3.12.
Description check ✅ Passed The description is directly related to the Dockerfile and Python 3.12 build fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile`:
- Line 17: The pip bootstrap step in the Dockerfile can silently succeed even if
the download is truncated or curl fails, so update the setup to fail fast during
the bootstrap and avoid relying on an unchecked pipe into python3.12. Use the
Dockerfile’s pip-install bootstrap step to ensure download failures stop the
build immediately, and add verification for the fetched get-pip.py content
before executing it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 69137a31-916c-4b79-9292-74cad00da066

📥 Commits

Reviewing files that changed from the base of the PR and between c8b9b92 and fe87df5.

📒 Files selected for processing (1)
  • phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile

Comment thread phases/00-setup-and-tooling/07-docker-for-ai/code/Dockerfile Outdated
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

@EnergeticBone is attempting to deploy a commit to the OSS program Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant