docker: add Ubuntu 24.04 Dockerfile and update dependencies#37
docker: add Ubuntu 24.04 Dockerfile and update dependencies#37fruffy merged 4 commits intop4lang:mainfrom
Conversation
Signed-off-by: Prakash Kumar <kumarprakash3909@gmail.com>
9a75cea to
2d036d1
Compare
| ldconfig && \ | ||
| mkdir -p /output/usr/local | ||
|
|
||
| RUN pip3 install "Cython<3" |
There was a problem hiding this comment.
Why do we need Cython<3? here?
There was a problem hiding this comment.
This was added during local builds because some grpc python build steps
failed with Cython 3 on Ubuntu 24.04. Pinning Cython<3 ensured the grpc
python package could be compiled successfully.
If this constraint is no longer necessary for the current dependency
versions, I am happy to remove it.
There was a problem hiding this comment.
Well, let's see if we can remove it to keep things simple.
|
We also need to publish a version of this image to docker, then we can test it in downstream repos. |
Dockerfile
Outdated
| # installed version of the protobuf python package that we copied from the | ||
| # protobuf build image. | ||
| # RUN pip3 install --user -rrequirements.txt | ||
| # RUN env GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip3 install --user --ignore-installed . |
There was a problem hiding this comment.
Good catch. I have removed the commented lines in the latest commit.
Signed-off-by: Prakash Kumar <kumarprakash3909@gmail.com>
|
That makes sense. Once the Dockerfile changes are finalized, publishing a test image will |
Signed-off-by: fruffy <fruffy@nyu.edu>
85dd747 to
b2c8c00
Compare
|
@p2peek Took the liberty to push a commit to trigger CI. Sometimes this stuff gets stuck because of permission issues with first-time contributors. |
|
Thanks for pushing the commit to trigger CI — I appreciate the help! The Dockerfile changes are now updated and CI checks are passing. Once the image workflow is finalized, I’d also be happy to help test the downstream repositories (PI and behavioral-model) with the Ubuntu 24.04 base image. |
Can you address the request to remove |
|
@p2peek Just following up on this, do you still plan to work on this? |
|
@fruffy Thanks for the follow-up! I removed all Cython-related dependencies and the GRPC_PYTHON_BUILD_WITH_CYTHON flag as suggested and tested the build locally. However, the gRPC Python build fails on Ubuntu 24.04 (Python 3.12) with Cython-related compilation errors (noexcept mismatch). It appears that gRPC still requires Cython (specifically <3) to build successfully in this environment. Would you prefer reintroducing the Cython<3 constraint for now, or exploring an alternative gRPC version or build configuration? Happy to proceed either way. |
yess |
That is a little strange, we should definitely not need any special settings for Ubuntu 24.04 and gRPCs. Those are two very standard configurations. |
I investigated the issue further and confirmed that the failure was caused by grpc being built from source, which required Cython and led to compilation errors. To resolve this, I updated the Dockerfile to install grpcio from prebuilt wheels instead of building grpc Python bindings from source. This removes the need for Cython entirely and aligns with the expected behavior in a clean environment. The Docker build now completes successfully on Ubuntu 24.04. |
fruffy
left a comment
There was a problem hiding this comment.
Let's merge this and see what breaks.
|
Please fix the failing DCO |
Signed-off-by: Prakash Kumar <kumarprakash3909@gmail.com>
7363a7c to
956eae8
Compare
This PR introduces an updated Dockerfile for building the P4 CI stack using Ubuntu 24.04 instead of the current Ubuntu 20.04 base image.
Changes
Dockerfile.24based onubuntu:24.04Local Build Testing
The following Docker build chain was successfully tested locally:
ubuntu:24.04
→ third-party
→ PI
→ behavioral-model
All images built successfully.
The
p4cimage still requires additional adjustments and will be handled separately.Motivation
This work is part of the effort to migrate the Docker CI infrastructure from Ubuntu 20.04 → Ubuntu 24.04, as discussed in Issue #38.
Related Issue
Fixes / contributes to #38