Skip to content

Commit

Permalink
Update Dockerfile.sm
Browse files Browse the repository at this point in the history
  • Loading branch information
jalencato authored Sep 30, 2024
1 parent 5561659 commit d2ebac9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docker/sagemaker/Dockerfile.sm
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
# 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:2.3.0-gpu-py311-cu121-ubuntu20.04-sagemaker as branch-gpu
ENV dev_type=GPU
# Install DGL GPU version
RUN pip3 install dgl==2.3.0+cu121 -f https://data.dgl.ai/wheels/torch-2.3/cu121/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:2.3.0-cpu-py311-ubuntu20.04-sagemaker as branch-cpu
ENV dev_type=CPU
# Install DGL CPU version
RUN pip3 install dgl==2.3.0 -f https://data.dgl.ai/wheels/torch-2.3/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

Expand Down Expand Up @@ -46,7 +47,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}"
Expand Down

0 comments on commit d2ebac9

Please sign in to comment.