Skip to content

Commit

Permalink
Update docker GPU, avoid long build time (#1966)
Browse files Browse the repository at this point in the history
Co-authored-by: Miro <mirhodak@amd.com>
  • Loading branch information
pgmpablo157321 and mrmhodak authored Dec 18, 2024
1 parent 3ae2b2a commit 03c9666
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions graph/R-GAT/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ docker build . -f dockerfile.gpu -t rgat-gpu
```
Run docker container:
```bash
docker run --rm -it -v $(pwd):/root --gpus all rgat-gpu
docker run --rm -it -v $(pwd):/workspace/root --gpus all rgat-gpu
```
Run benchmark inside the docker container:
Go inside the root folder and run benchmark inside the docker container:
```bash
cd root
python3 main.py --dataset igbh-dgl --dataset-path igbh/ --profile rgat-dgl-full --device gpu [--model-path <path_to_ckpt>] [--in-memory] [--dtype <fp16 or fp32>] [--scenario <SingleStream, MultiStream, Server or Offline>]
```
6 changes: 2 additions & 4 deletions graph/R-GAT/dockerfile.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ RUN apt install -y --no-install-recommends rsync
# Upgrade pip
RUN python3 -m pip install --upgrade pip

RUN pip install torch-geometric torch-scatter torch-sparse -f https://pytorch-geometric.com/whl/torch-2.1.0+cu121.html
RUN pip install dgl -f https://data.dgl.ai/wheels/torch-2.1/cu121/repo.html

COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
Expand All @@ -35,10 +37,6 @@ RUN cd /tmp && \
pip install pybind11 && \
CFLAGS="-std=c++14" python3 setup.py install

RUN export TORCH_VERSION=$(python -c "import torch; print(torch.__version__)")
RUN pip install torch-geometric torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-${TORCH_VERSION}.html
RUN pip install dgl -f https://data.dgl.ai/wheels/torch-2.1/cu121/repo.html

# Clean up
RUN rm -rf mlperf \
rm requirements.txt

0 comments on commit 03c9666

Please sign in to comment.