FROM us-docker.pkg.dev/deeplearning-platform-release/gcr.io/tf-gpu:latest
# Uninstall the container's TensorFlow version and install the latest version
RUN pip install --upgrade pip && \
pip uninstall -y tensorflow && \
pip install tensorflow
建構並推送容器映像檔
請使用下列指令,建構並將容器映像檔推送至 Artifact Registry,讓 Google Compute Engine 服務帳戶存取。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-16 (世界標準時間)。"],[[["This guide details the process of creating a derivative container from a standard Deep Learning Containers image, using either Cloud Shell or an environment with the Google Cloud CLI installed."],["The process involves creating an initial Dockerfile and executing modification commands, such as using conda, pip, or Jupyter commands, to customize the container image."],["Before starting, ensure you have completed the necessary setup steps, including enabling billing for your Google Cloud project and the Artifact Registry API."],["After modifying the container, you need to build it and push the resulting image to a repository, such as Artifact Registry, that is accessible to your Compute Engine service account."],["The example provided shows how to take a tensorflow image, and modify the container by uninstalling the current version and installing the latest version of Tensorflow."]]],[]]