Skip to content

Commit 47bd08e

Browse files
authored
Fix papermill (#165)
http://b/191304257
1 parent 3022941 commit 47bd08e

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Dockerfile

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ FROM gcr.io/kaggle-images/rcran:${BASE_TAG}
44

55
ADD clean-layer.sh /tmp/clean-layer.sh
66

7-
# Default to python3.7
8-
RUN apt-get update && \
9-
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 1 && \
10-
update-alternatives --config python && \
11-
apt install -y python3-pip python3-venv && \
12-
/tmp/clean-layer.sh
7+
# Default to python3.8
8+
RUN ln -sf /usr/bin/python3.8 /usr/bin/python
9+
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
10+
RUN python get-pip.py
1311

1412
RUN apt-get update && \
1513
apt-get install apt-transport-https && \
@@ -36,7 +34,7 @@ RUN apt-get install -y libhdf5-dev && \
3634
/tmp/clean-layer.sh
3735

3836
RUN apt-get install -y libzmq3-dev default-jdk && \
39-
apt-get install -y python-dev libcurl4-openssl-dev libssl-dev && \
37+
apt-get install -y python3.8-dev libcurl4-openssl-dev libssl-dev && \
4038
pip install jupyter pycurl && \
4139
# Install older tornado - https://github.com/jupyter/notebook/issues/4437
4240
pip install "tornado<6" && \

test

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ docker run -d --name=jupyter_test_r --read-only --net=none \
8383
sleep 3
8484
docker kill jupyter_test_r && docker rm jupyter_test_r
8585

86+
# Check that papermill is installed in python (b/191304257).
87+
docker run --rm --name=papermill_test_r --read-only --net=none \
88+
"$IMAGE_TAG" python -c 'import sys;import papermill as pm; print(pm.__version__)'
89+
8690
docker run --rm -t --net=none \
8791
-e HOME=/tmp \
8892
-v $PWD:/input:ro -v /tmp/rstats-build/working:/working \

0 commit comments

Comments
 (0)