> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Dockerfile을 지정하고 W&B가 도커 이미지를 빌드하게 할 수 있나요?

예. 직접 Dockerfile을 제공하고 W\&B Launch가 해당 run에 사용할 이미지를 빌드하도록 할 수 있습니다. 이렇게 하면 Launch를 사용해 작업을 큐에 넣고 실행하면서도 빌드 환경은 직접 제어할 수 있습니다. 이 방식은 요구 사항은 안정적이지만 코드베이스는 자주 바뀌는 프로젝트에 특히 적합합니다.

<Warning>
  Dockerfile은 마운트를 사용하도록 작성하세요. 자세한 내용은 [Docker mounts documentation](https://docs.docker.com/build/guide/mounts/)을 참조하세요.
</Warning>

Dockerfile을 설정한 후에는 다음 방법 중 하나로 W\&B에 지정하세요.

* `Dockerfile.wandb` 사용
* W\&B CLI 사용
* W\&B App 사용

<Tabs>
  <Tab title="Dockerfile.wandb">
    W\&B run의 entrypoint와 같은 디렉터리에 `Dockerfile.wandb` 파일을 두세요. W\&B는 기본 제공 Dockerfile 대신 이 파일을 사용합니다.
  </Tab>

  <Tab title="W&B CLI">
    작업을 큐에 넣으려면 `wandb launch` 명령에 `--dockerfile` 플래그를 사용하세요.

    ```bash theme={null}
    wandb launch --dockerfile path/to/Dockerfile
    ```
  </Tab>

  <Tab title="W&B App">
    W\&B App에서 작업을 큐에 추가할 때 **Overrides** 섹션에 Dockerfile 경로를 입력하세요. 키는 `"dockerfile"`로, 값은 경로로 하는 키-값 쌍으로 입력하면 됩니다.

    다음 JSON은 로컬 디렉터리의 Dockerfile을 포함하는 방법을 보여줍니다.

    ```json title="Launch 작업 W&B App" theme={null}
    {
      "args": [],
      "run_config": {
        "lr": 0,
        "batch_size": 0,
        "epochs": 0
      },
      "entrypoint": [],
      "dockerfile": "./Dockerfile"
    }
    ```
  </Tab>
</Tabs>
