diff --git a/docker/sagemaker/Dockerfile.sm b/docker/sagemaker/Dockerfile.sm index 93c2c6092f..97df1ba223 100644 --- a/docker/sagemaker/Dockerfile.sm +++ b/docker/sagemaker/Dockerfile.sm @@ -2,16 +2,19 @@ # Note: Distributed graph partition will use another docker image which will come soon. ARG DEVICE=gpu +ARG DGL_VERSION=2.3.0 -FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.13.1-gpu-py39-cu117-ubuntu20.04-sagemaker as branch-gpu +FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.3.0-gpu-py311-cu121-ubuntu20.04-sagemaker as branch-gpu ENV dev_type=GPU +ARG DGL_VERSION # Install DGL GPU version -RUN pip3 install dgl==1.0.4+cu117 -f https://data.dgl.ai/wheels/cu117/repo.html && rm -rf /root/.cache +RUN pip3 install dgl==${DGL_VERSION}+cu121 -f https://data.dgl.ai/wheels/torch-2.3/cu121/repo.html && rm -rf /root/.cache -FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:1.13.1-cpu-py39-ubuntu20.04-sagemaker as branch-cpu +FROM 763104351884.dkr.ecr.us-east-1.amazonaws.com/pytorch-training:2.3.0-cpu-py311-ubuntu20.04-sagemaker as branch-cpu ENV dev_type=CPU +ARG DGL_VERSION # Install DGL CPU version -RUN pip3 install dgl==1.0.4 -f https://data.dgl.ai/wheels-internal/repo.html && rm -rf /root/.cache +RUN pip3 install dgl==${DGL_VERSION} -f https://data.dgl.ai/wheels/torch-2.3/repo.html && rm -rf /root/.cache FROM branch-${DEVICE} AS final @@ -46,7 +49,7 @@ ENV PYTHONPATH="/opt/ml/code/graphstorm/python/:${PYTHONPATH}" RUN cp /opt/ml/code/graphstorm/sagemaker/run/* /opt/ml/code/ # Download DGL source code -RUN cd /root; git clone https://github.com/dmlc/dgl.git +RUN cd /root; git clone --branch v${DGL_VERSION} https://github.com/dmlc/dgl.git # Un-comment if we prefer a local DGL distribution # COPY dgl /root/dgl ENV PYTHONPATH="/root/dgl/tools/:${PYTHONPATH}"