시작하려면 사용 가능한 이미지 유형 중 하나를 사용하여 Deep Learning Containers 컨테이너를 만듭니다.
그런 다음 conda, pip 또는 Jupyter 명령어를 사용하여 필요에 따라 컨테이너 이미지를 수정합니다.
컨테이너 이미지를 빌드하고 푸시합니다.
컨테이너 이미지를 빌드한 다음 Compute Engine 서비스 계정에서 액세스할 수 있는 위치로 푸시합니다.
초기 Dockerfile 만들기 및 수정 명령어 실행
다음 명령어를 사용하여 Deep Learning Containers 이미지 유형을 선택하고 컨테이너 이미지를 약간 변경합니다. 이 예시는 TensorFlow 이미지로 시작하고 최신 버전의 TensorFlow로 이미지를 업데이트하는 방법을 보여줍니다.
Dockerfile에 다음 명령어를 작성합니다.
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
컨테이너 이미지 빌드 및 푸시
다음 명령어를 사용하여 컨테이너 이미지를 Google Compute Engine 서비스 계정으로 액세스할 수 있는 Artifact Registry로 빌드하고 푸시합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(UTC)"],[[["\u003cp\u003eThis 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.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves creating an initial Dockerfile and executing modification commands, such as using conda, pip, or Jupyter commands, to customize the container image.\u003c/p\u003e\n"],["\u003cp\u003eBefore starting, ensure you have completed the necessary setup steps, including enabling billing for your Google Cloud project and the Artifact Registry API.\u003c/p\u003e\n"],["\u003cp\u003eAfter 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.\u003c/p\u003e\n"],["\u003cp\u003eThe 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.\u003c/p\u003e\n"]]],[],null,[]]