Skip to content

Commit 7c68466

Browse files
authored
Update Dockerfile.rocky9
Elaborate and polish comment about the choice of paramiko and bcrypt version in pip installation. Signed-off-by: Jonas Bardino <bardino@science.ku.dk>
1 parent 585bbc8 commit 7c68466

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

Dockerfile.rocky9

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,10 +768,19 @@ RUN if [ "${UPGRADE_PARAMIKO}" = "True" ]; then \
768768
# dependencies specifically into /usr instead.
769769
#pip3 install -U setuptools; \
770770
#pip3 install setuptools_rust; \
771-
# Additional NOTE: paramiko version 3.0.0 introduces several changes that in particular improves the SFTP download performance.
772-
# At the time of writing, the upcoming rhel10 epel uses 3.5, which we use as a version floor for which to use.
773-
# However, bcrypt version 4 and above has shown to produce import errors in mod_wsgi caused by the usage of sub-interpreters
774-
# as highlighted at https://github.com/PyO3/pyo3/blob/main/guide/src/migration.md#each-pymodule-can-now-only-be-initialized-once-per-process
771+
# Additional NOTE: paramiko version 3.x introduces several changes
772+
# that in particular improve the SFTP download performance.
773+
# At the time of writing, the RHEL/Rocky 10 EPEL repo provides 3.5,
774+
# which we use as a version baseline to mimic.
775+
# However, combining that with recent bcrypt versions in the 4.x
776+
# series leads to import errors in mod_wsgi caused by the usage of
777+
# sub-interpreters as highlighted at
778+
# https://github.com/PyO3/pyo3/blob/main/guide/src/migration.md#each-pymodule-can-now-only-be-initialized-once-per-process
779+
# with further explanation at
780+
# https://bugzilla.redhat.com/show_bug.cgi?id=2255688 and
781+
# https://github.com/PyO3/pyo3/issues/3451
782+
# So we explicitly cap the bcrypt version to the latest 3.2 one,
783+
# which coincides with the default Rocky version, btw.
775784
pip3 install --prefix=$(python3-config --prefix) 'paramiko>=3.5' 'bcrypt<4'; \
776785
fi; \
777786
fi;

0 commit comments

Comments
 (0)