Skip to content

Commit 3ccb21a

Browse files
authored
Merge pull request #1462 from minrk/libcurl
ensure pycurl is available in image
2 parents 98940b2 + d19a36a commit 3ccb21a

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

binderhub/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ def init_pycurl(self):
698698
try:
699699
AsyncHTTPClient.configure("tornado.curl_httpclient.CurlAsyncHTTPClient")
700700
except ImportError as e:
701-
self.log.debug("Could not load pycurl: %s\npycurl is recommended if you have a large number of users.", e)
701+
self.log.warning("Could not load pycurl: %s\npycurl is recommended if you have a large number of users.", e)
702702
# set max verbosity of curl_httpclient at INFO
703703
# because debug-logging from curl_httpclient
704704
# includes every full request and response

helm-chart/images/binderhub/Dockerfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,29 +46,28 @@ WORKDIR /
4646
# before SIGKILL when "docker stop" or "kubectl delete pod" is run. By doing
4747
# that the pod can terminate very quickly.
4848
COPY --from=build-stage /tini /tini
49-
49+
5050
# The slim version doesn't include git as required by binderhub
51+
# or libcurl required by pycurl
5152
RUN apt-get update \
5253
&& apt-get install --yes \
5354
git \
55+
libcurl4 \
5456
&& rm -rf /var/lib/apt/lists/*
5557

5658
# Copy the built wheels from the build-stage. Also copy the image
5759
# requirements.txt built from the binderhub package requirements.txt and the
58-
# requirements.in file using the ./dependency script.
60+
# requirements.in file using pip-compile.
5961
COPY --from=build-stage /tmp/binderhub/dist/*.whl pre-built-wheels/
6062
COPY helm-chart/images/binderhub/requirements.txt .
6163

6264
# Install pre-built wheels and the generated requirements.txt for the image.
65+
# make sure that imports work,
66+
# because wheels were built in the build-stage
6367
RUN pip install --no-cache-dir \
6468
pre-built-wheels/*.whl \
65-
-r requirements.txt
66-
67-
# When using the ./dependency script to output a frozen environment, we do it
68-
# from within this container. So below we conditionally install pip-tools for
69-
# use by the ./dependency script.
70-
ARG PIP_TOOLS=
71-
RUN test -z "$PIP_TOOLS" || pip install --no-cache pip-tools==$PIP_TOOLS
69+
-r requirements.txt \
70+
&& python3 -c "import pycurl, binderhub.app"
7271

7372
ENTRYPOINT ["/tini", "--", "python3", "-m", "binderhub"]
7473
CMD ["--config", "/etc/binderhub/config/binderhub_config.py"]

0 commit comments

Comments
 (0)