Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
guolinke committed Feb 25, 2025
1 parent a1462e7 commit 083e143
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker_rdma_latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
name: Build and push with rdma
uses: docker/build-push-action@v6
with:
context: ./docker/rdma/
context: .
file: ./docker/rdma/Dockerfile
push: true
tags: |
dptechnology/unicore:2405-pytorch2.4.1-cuda12.4-rdma
Expand Down
19 changes: 11 additions & 8 deletions docker/rdma/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM nvcr.io/nvidia/pytorch:24.05-py3

WORKDIR /app
# copy code to /app
COPY . /app

RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
rm -rf /var/lib/apt/lists/* \
/etc/apt/sources.list.d/cuda.list \
Expand Down Expand Up @@ -58,21 +62,20 @@ ENV TORCH_CUDA_ARCH_LIST "7.0;7.5;8.0;9.0"
RUN pip3 uninstall torch torchvision torchaudio -y && pip3 install torch==2.4.1 torchvision==0.19.1 --index-url https://download.pytorch.org/whl/cu124 && \
rm -rf /tmp/* && rm -rf ~/.cache/pip


RUN pip3 install --no-cache-dir --upgrade sentry-sdk requests ninja typing packaging wandb rdkit ase tokenizers lmdb ml-collections tensorboardX && rm -rf ~/.cache/pip

# install unicore
RUN python setup.py install --enable-cuda-ext && \
rm -rf /app/* && rm -rf ~/.cache/pip

RUN pip3 uninstall flash_attn -y && cd /tmp && \
git clone https://github.com/Dao-AILab/flash-attention.git && \
cd flash-attention && \
git checkout v2.6.3 && \
python setup.py install && \
rm -rf /tmp/* && rm -rf ~/.cache/pip

RUN pip3 install --no-cache-dir --upgrade sentry-sdk requests ninja typing packaging wandb rdkit ase tokenizers lmdb ml-collections tensorboardX && rm -rf ~/.cache/pip

RUN cd /tmp && \
git clone https://github.com/dptech-corp/Uni-Core && \
cd Uni-Core && \
python setup.py install --enable-cuda-ext && \
rm -rf /tmp/* && rm -rf ~/.cache/pip

RUN pip3 install --no-cache-dir biopython timeout-decorator urllib3 tree dm-tree && rm -rf ~/.cache/pip

RUN ldconfig && \
Expand Down

0 comments on commit 083e143

Please # to comment.