FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Default tensorflow to the TPU VM · ZahidSQLDBA/docker-python@a3bbfe4 · GitHub

Commit a3bbfe4

Browse files
authored
Default tensorflow to the TPU VM
1 parent 4fccb8b commit a3bbfe4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎tpu/Dockerfile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ RUN pip install papermill jupyterlab python-lsp-server[all] jupyterlab-lsp
6464
# Additional useful packages should be added here:
6565
RUN pip install pandas
6666

67+
# Monkey-patch the default TPU to the local (TPU VM).
68+
RUN sed -i 's/def connect(tpu=None,/def connect(tpu="local",/' /usr/local/lib/python3.8/site-packages/tensorflow/python/distribute/cluster_resolver/tpu/tpu_cluster_resolver.py
69+
6770
# Set these env vars so that they don't produce errs calling the metadata server to load them:
6871
ENV TPU_ACCELERATOR_TYPE=v3-8
6972
ENV TPU_PROCESS_ADDRESSES=local

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL