File size: 1,412 Bytes
45361be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Docker Compose Example (GPT3 175B)

A Docker compose example for GPT3 175B. To enable passwordless ssh, the `docker-compose.yml` mounts the `ssh` directory
that contains a pre-generated ssh rsa key. Copying this same key to all running containers in the cluster allows
passwordless ssh between containers.

Example yaml configuration for GPT3 175B. It builds the docker image based off the dockerfile and mounts necessary 
models and datasets.

``` [yaml]
version: '3.3'

services:
  gpt3:
    image: gpt3-pytorch-installer-1.13.1
    build:
      context: .
      network: host
      args:
        BASE_IMAGE: "${BASE_IMAGE}"
    container_name: gpt3_demo
    runtime: habana
    environment:
    - HABANA_VISIBLE_DEVICES=all
    - OMPI_MCA_btl_vader_single_copy_mechanism=none
    - MODEL_GARDEN_ROOT=/model_garden/
    cap_add:
      - SYS_NICE
    ipc: host
    network_mode: host
    working_dir: /launch
    volumes:
      - ./ssh:/root/.ssh/
      - ./launch:/launch
      - ./launch/.deepspeed_env:/root/.deepspeed_env
      - /data/preprocessed_c4_spm:/software/data/datasets/c4_mlperf_19_12_2022/preprocessed_c4_spm
      - /data/model_garden:/model_garden
    tty: true

```

## Example Launch Scripts

I have constructed a few examples in the `launch` folder for hccl_demo, and PyTorch MNIST. To run these 
scripts, download the necessary repos (hccl_demo, model_garden, deepspeed-fork, etc...)