Skip to content

Commit 8f367e2

Browse files
committed
change dockerfile to build from source
1 parent a92ad68 commit 8f367e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

build/nvcr.Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ FROM nvcr.io/nvidia/pytorch:${NVCR_IMAGE_VERSION} AS dev
2626
ARG USER=root
2727
ARG USER_UID=0
2828
ARG WORKDIR=/app
29-
ARG SOURCE_DIR=/app/fms-hf-tuning
30-
ARG SOURCE_BRANCH=main
29+
ARG SOURCE_DIR=${WORKDIR}/fms-hf-tuning
3130

3231
ARG ENABLE_FMS_ACCELERATION=true
3332
ARG ENABLE_AIM=true
@@ -47,7 +46,7 @@ RUN python -m pip install --upgrade pip
4746
RUN pip install --upgrade --force-reinstall torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu128
4847

4948
# Install main package + flash attention
50-
RUN git clone --branch ${SOURCE_BRANCH} --depth 1 https://github.com/foundation-model-stack/fms-hf-tuning.git ${SOURCE_DIR}
49+
RUN COPY . ${SOURCE_DIR}
5150
RUN cd ${SOURCE_DIR}
5251
RUN pip install --no-cache-dir ${SOURCE_DIR} && \
5352
pip install --no-cache-dir ${SOURCE_DIR}[flash-attn]
@@ -94,5 +93,4 @@ ENV TRITON_OVERRIDE_DIR="/tmp/triton_override_dir"
9493

9594
WORKDIR $WORKDIR
9695

97-
# this is just a dev image so this is okay.
98-
CMD ["sleep inifinity"]
96+
CMD ["${SOURCE_DIR}/build/accelerate_launch.py"]

0 commit comments

Comments
 (0)