Skip to content

Commit

Permalink
check the workspace location and what is in there
Browse files Browse the repository at this point in the history
  • Loading branch information
tjtanaa committed Dec 6, 2024
1 parent 6d37fc4 commit b094e7c
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions Dockerfile.rocm
Original file line number Diff line number Diff line change
Expand Up @@ -4,67 +4,22 @@ ARG BASE_IMAGE="rocm/pytorch:rocm6.2.3_ubuntu22.04_py3.10_pytorch_release_2.3.0_
### Base image build stage
FROM $BASE_IMAGE AS base

# # Install some basic utilities
# RUN apt-get update && apt-get install python3 python3-pip -y
# RUN apt-get update && apt-get install -y \
# curl \
# ca-certificates \
# sudo \
# git \
# bzip2 \
# libx11-6 \
# build-essential \
# wget \
# unzip \
# tmux \
# ccache \
# && rm -rf /var/lib/apt/lists/*

# When launching the container, mount the code directory to /liger-kernel-workspace
ARG APP_MOUNT=/liger-kernel-workspace
WORKDIR ${APP_MOUNT}

# RUN python3 -m pip install --upgrade pip
# # Remove sccache so it doesn't interfere with ccache
# # TODO: implement sccache support across components
# RUN apt-get purge -y sccache; python3 -m pip uninstall -y sccache; rm -f "$(which sccache)"

# RUN --mount=type=cache,target=/root/.cache/pip \
# python3 -m pip install triton==3.1.0 transformers==4.46.3

# ENV LLVM_SYMBOLIZER_PATH=/opt/rocm/llvm/bin/llvm-symbolizer
# ENV PATH=$PATH:/opt/rocm/bin:/libtorch/bin:
# ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/rocm/lib/:/libtorch/lib:
# ENV CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/libtorch/include:/libtorch/include/torch/csrc/api/include/:/opt/rocm/include/:

# ENV PYTORCH_ROCM_ARCH=${PYTORCH_ROCM_ARCH}
# ENV CCACHE_DIR=/root/.cache/ccache


# ### AMD-SMI build stage
# FROM base AS build_amdsmi
# # Build amdsmi wheel always
# RUN cd /opt/rocm/share/amd_smi \
# && python3 -m pip wheel . --wheel-dir=/install


### Final Liger-Kernel build stage
FROM base AS final
# Import the Liger-Kernel development directory from the build context
COPY . .

RUN python3 -m pip install --upgrade pip
RUN ls

RUN --mount=type=cache,target=${CCACHE_DIR} \
--mount=type=bind,source=.git,target=.git \
--mount=type=cache,target=/root/.cache/pip \
python3 -m pip install -e .[dev]

# # Copy amdsmi wheel into final image
# RUN --mount=type=bind,from=build_amdsmi,src=/install,target=/install \
# mkdir -p libs \
# && cp /install/*.whl libs \
# # Preemptively uninstall to avoid same-version no-installs
# && python3 -m pip uninstall -y amdsmi;

CMD ["/bin/bash"]

0 comments on commit b094e7c

Please sign in to comment.