Skip to content

Commit 9f27a5b

Browse files
authored
Add Kaggle patches
1 parent ae991f3 commit 9f27a5b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tpu/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@ ENV ISTPUVM=1
1414
ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl
1515
ADD patches/template_conf.json /opt/kaggle/conf.json
1616

17+
# Add BigQuery client proxy settings, kaggle secrets etc.
18+
ENV PYTHONUSERBASE "/root/.local"
19+
ADD patches/kaggle_secrets.py /root/.local/lib/python3.8/site-packages/kaggle_secrets.py
20+
ADD patches/kaggle_session.py /root/.local/lib/python3.8/site-packages/kaggle_session.py
21+
ADD patches/kaggle_web_client.py /root/.local/lib/python3.8/site-packages/kaggle_web_client.py
22+
ADD patches/kaggle_datasets.py /root/.local/lib/python3.8/site-packages/kaggle_datasets.py
23+
24+
# Disable GCP integrations for now
25+
# ADD patches/kaggle_gcp.py /root/.local/lib/python3.8/site-packages/kaggle_gcp.py
26+
27+
# Disable logging to file (why do we need this?)
28+
# ADD patches/log.py /root/.local/lib/python3.8/site-packages/log.py
29+
30+
# sitecustomize adds significant latency to ipython kernel startup and should only be added if needed
31+
# ADD patches/sitecustomize.py /root/.local/lib/python3.8/site-packages/sitecustomize.py
32+
1733
# Tensorflow wheel:
1834
# When tensorflow is compatible with being installed alongside JAX/Pytorch then we no longer need to include the wheel and can install it directly.
1935
# RUN pip install https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-cp38-cp38-linux_x86_64.whl

0 commit comments

Comments
 (0)