Skip to content

Commit 8d0d881

Browse files
committed
unpin pycurl
make sure to use build-stage wheels by adding --no-index to pip install avoids installing higher-priority wheels from PyPI instead of what we built (i.e. pycurl)
1 parent 73c46d5 commit 8d0d881

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

images/hub/Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ FROM python:3.11-bullseye as build-stage
2121
COPY requirements.txt requirements.txt
2222
ARG PIP_CACHE_DIR=/tmp/pip-cache
2323
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
24-
pip install build \
25-
&& pip wheel \
24+
pip wheel \
2625
--wheel-dir=/tmp/wheels \
26+
# pycurl 7.45.3 has wheels, but they aren't portable
27+
# https://github.com/pycurl/pycurl/issues/834
28+
--no-binary pycurl \
2729
-r requirements.txt \
2830
# Additional wheels for default-stage. Updates below should be repeated
2931
# in default-stage.
@@ -63,11 +65,13 @@ RUN apt-get update \
6365
&& rm -rf /var/lib/apt/lists/*
6466

6567
# install wheels built in the build stage
68+
# --no-index ensures _only_ wheels from the build stage are installed
6669
COPY requirements.txt /tmp/requirements.txt
6770
ARG PIP_CACHE_DIR=/tmp/pip-cache
6871
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
6972
--mount=type=cache,from=build-stage,source=/tmp/wheels,target=/tmp/wheels \
7073
pip install \
74+
--no-index \
7175
--find-links=/tmp/wheels/ \
7276
-r /tmp/requirements.txt
7377

@@ -93,6 +97,7 @@ ARG PIP_CACHE_DIR=/tmp/pip-cache
9397
RUN --mount=type=cache,target=${PIP_CACHE_DIR} \
9498
--mount=type=cache,from=build-stage,source=/tmp/wheels,target=/tmp/wheels \
9599
pip install \
100+
--no-index \
96101
--find-links=/tmp/wheels/ \
97102
# Updates below should be repeated in build-stage.
98103
#

images/hub/requirements.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ jupyterhub-kubespawner
2929
## Other optional dependencies for additional features
3030
pymysql # mysql
3131
psycopg2 # postgres
32-
# pycurl 7.45.3 is avoided because https://github.com/pycurl/pycurl/issues/834
33-
pycurl!=7.45.3 # internal http requests handle more load with pycurl
32+
pycurl # internal http requests handle more load with pycurl
3433
sqlalchemy-cockroachdb # cocroachdb
3534
statsd # statsd metrics collection (TODO: remove soon, since folks use prometheus)
3635

images/hub/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pyasn1==0.5.1
129129
# via ldap3
130130
pycparser==2.21
131131
# via cffi
132-
pycurl==7.45.2
132+
pycurl==7.45.3
133133
# via -r requirements.in
134134
pyjwt[crypto]==2.8.0
135135
# via

0 commit comments

Comments
 (0)