diff --git a/docs/source/examples/docker-containers.rst b/docs/source/examples/docker-containers.rst index 20e47e34dc9..99a967fd972 100644 --- a/docs/source/examples/docker-containers.rst +++ b/docs/source/examples/docker-containers.rst @@ -27,27 +27,27 @@ For example, to use the :code:`ubuntu:20.04` image from Docker Hub: run: | # Will run inside container -For Docker images hosted on private registries, you can provide the registry authentication details using the :code:`envs` section: +For Docker images hosted on private registries, you can provide the registry authentication details using :ref:`task environment variables `: .. code-block:: yaml - # private_docker.yaml + # ecr_private_docker.yaml resources: - image_id: docker:: + image_id: docker:.dkr.ecr.us-east-1.amazonaws.com/: + # the following shorthand is also supported: + # image_id: docker:: envs: - SKYPILOT_DOCKER_USERNAME: - SKYPILOT_DOCKER_PASSWORD: - SKYPILOT_DOCKER_SERVER: + SKYPILOT_DOCKER_USERNAME: AWS + # SKYPILOT_DOCKER_PASSWORD: + SKYPILOT_DOCKER_SERVER: .dkr.ecr.us-east-1.amazonaws.com -Alternatively, you can set these environment variables directly through the CLI: +We suggest to setting the :code:`SKYPILOT_DOCKER_PASSWORD` environment variable through the CLI (see :ref:`passing secrets `): .. code-block:: bash - $ sky launch \ - --env SKYPILOT_DOCKER_PASSWORD=$(aws ecr get-login-password --region us-east-1) \ - --env SKYPILOT_DOCKER_USERNAME=AWS \ - private_docker.yaml + $ export SKYPILOT_DOCKER_PASSWORD=$(aws ecr get-login-password --region us-east-1) + $ sky launch ecr_private_docker.yaml --env SKYPILOT_DOCKER_PASSWORD Running Docker Containers as Tasks ---------------------------------- diff --git a/docs/source/running-jobs/environment-variables.rst b/docs/source/running-jobs/environment-variables.rst index 884d4649295..d4b5244c33d 100644 --- a/docs/source/running-jobs/environment-variables.rst +++ b/docs/source/running-jobs/environment-variables.rst @@ -62,6 +62,9 @@ For example, this is useful for passing secrets (see below) or passing configura See complete examples at `llm/vllm/serve.yaml `_ and `llm/vicuna/train.yaml `_. + +.. _passing-secrets: + Passing secrets ~~~~~~~~~~~~~~~~~~~~~~~~