bobbai00 commented on code in PR #9655:
URL: https://github.com/apache/texera/pull/9655#discussion_r4675062187


##########
bin/dockerfiles/computing-unit-master.dockerfile:
##########
@@ -84,7 +84,9 @@ RUN python3 bin/licensing/concat_license_binary.py 
amber/LICENSE-binary-combined
         amber/LICENSE-binary-java \
         amber/LICENSE-binary-python
 
-FROM 
docker.io/library/eclipse-temurin:17-jdk-jammy@sha256:60fcdd4a85c94a23ef86d0d55867c6a8dbc4f7c3efc8286e259956c3ea4ef08c
 AS runtime
+# Ubuntu 24.04 rather than the 22.04 of the other images: Python workers run
+# this image's python3, and 24.04's is 3.12, a version pyamber's CI tests.
+FROM 
docker.io/library/eclipse-temurin:17-jdk-noble@sha256:53686f59c44e08ac3310d39ef9c3e3d3bb03370366d9c45802229c86fa2d8369
 AS runtime

Review Comment:
   **Advisory:**
   
   Please add to the description that this also fixes the images' LICENSE. That 
is why the `release/v1.3` backport is a fix, since `add_note` (#8768) is not on 
that branch. On 3.10, aiohttp and anyio also install `async-timeout` and 
`exceptiongroup` (their `python_version < "3.11"` dependencies), and 
[`LICENSE-binary-python`](https://github.com/apache/texera/blob/935260dde26f61c202bdfdffd2354206ae1ff9d1/amber/LICENSE-binary-python#L215)
 lists neither. Only the 3.12 CI leg checks licenses 
([`build.yml:1179`](https://github.com/apache/texera/blob/935260dde26f61c202bdfdffd2354206ae1ff9d1/.github/workflows/build.yml#L1179)).
 The 3.12 images drop both, and `release/v1.3` has the same gap.



##########
bin/dockerfiles/computing-unit-master.dockerfile:
##########
@@ -96,9 +98,15 @@ ARG PACKAGE_SNAPSHOT
 RUN --mount=type=bind,source=bin/dockerfiles/snapshot,target=/snapshot \
     bash /snapshot/install.sh apt python3-pip python3-dev python3-venv 
libpq-dev
 
-# Install Python packages
+# Install Python packages into a venv, as 24.04's python3 is externally managed
+# (PEP 668). Its bin/ leads PATH, so the venv's is the `python3` that runs
+# Python workers and creates PVEs when udf.python.path is unset. It is created
+# in this layer so the pip upgrade removes the pip it is seeded with, whose
+# .pyc files are not byte-compiled reproducibly.

Review Comment:
   **Polish:**
   
   `udf.python.path` is not a key. 
[`UdfConfig.scala:29`](https://github.com/apache/texera/blob/935260dde26f61c202bdfdffd2354206ae1ff9d1/common/config/src/main/scala/org/apache/texera/common/config/UdfConfig.scala#L29)
 reads `python.path` from udf.conf, and deployments set it through 
`UDF_PYTHON_PATH`.
   ```suggestion
   # Python workers and creates PVEs when python.path in udf.conf 
(UDF_PYTHON_PATH)
   # is unset. It is created in this layer so the pip upgrade removes the pip it
   # is seeded with, whose .pyc files are not byte-compiled reproducibly.
   ```



##########
bin/dockerfiles/computing-unit-worker.dockerfile:
##########
@@ -94,11 +96,17 @@ COPY --from=build /texera/amber/operator-requirements.txt 
/tmp/operator-requirem
 # Install Python runtime dependencies
 ARG PACKAGE_SNAPSHOT
 RUN --mount=type=bind,source=bin/dockerfiles/snapshot,target=/snapshot \
-    bash /snapshot/install.sh apt python3-pip python3-dev libpq-dev
-
-# Install Python packages
+    bash /snapshot/install.sh apt python3-pip python3-dev python3-venv 
libpq-dev
+
+# Install Python packages into a venv, as 24.04's python3 is externally managed
+# (PEP 668). Its bin/ leads PATH, so the venv's is the `python3` that runs
+# Python workers and creates PVEs when udf.python.path is unset. It is created
+# in this layer so the pip upgrade removes the pip it is seeded with, whose
+# .pyc files are not byte-compiled reproducibly.

Review Comment:
   **Polish:**
   
   Same key name as in the master Dockerfile. The setting is `python.path` in 
udf.conf 
([`UdfConfig.scala:29`](https://github.com/apache/texera/blob/935260dde26f61c202bdfdffd2354206ae1ff9d1/common/config/src/main/scala/org/apache/texera/common/config/UdfConfig.scala#L29)),
 which deployments set through `UDF_PYTHON_PATH`.
   ```suggestion
   # Python workers and creates PVEs when python.path in udf.conf 
(UDF_PYTHON_PATH)
   # is unset. It is created in this layer so the pip upgrade removes the pip it
   # is seeded with, whose .pyc files are not byte-compiled reproducibly.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to