Skip to content

Commit 4db683d

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 2e03c1a + 5c09dbc commit 4db683d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

build/Dockerfile

+14-5
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ ARG PYTHON_VERSION
2727
ARG USER
2828
ARG USER_UID
2929

30+
# Note this works for 3.9, 3.11, 3.12
3031
RUN dnf remove -y --disableplugin=subscription-manager \
3132
subscription-manager \
32-
&& dnf install -y python${PYTHON_VERSION} procps \
33+
&& dnf install -y python${PYTHON_VERSION} procps g++ python${PYTHON_VERSION}-devel \
3334
&& ln -s /usr/bin/python${PYTHON_VERSION} /bin/python \
3435
&& python -m ensurepip --upgrade \
3536
&& python -m pip install --upgrade pip \
@@ -104,6 +105,7 @@ FROM cuda-devel AS python-installations
104105
ARG WHEEL_VERSION
105106
ARG USER
106107
ARG USER_UID
108+
ARG ENABLE_FMS_ACCELERATION=false
107109

108110
## Enable Aimstack if requested via ENABLE_AIM set to "true"
109111
ARG ENABLE_AIM=false
@@ -132,12 +134,19 @@ RUN if [[ -z "${WHEEL_VERSION}" ]]; \
132134
RUN --mount=type=cache,target=/home/${USER}/.cache/pip,uid=${USER_UID} \
133135
python -m pip install --user wheel && \
134136
python -m pip install --user "$(head bdist_name)" && \
135-
python -m pip install --user "$(head bdist_name)[flash-attn]" && \
136-
if [[ "${ENABLE_AIM}" == "true" ]]; then \
137+
python -m pip install --user "$(head bdist_name)[flash-attn]"
138+
139+
RUN if [[ "${ENABLE_FMS_ACCELERATION}" == "true" ]]; then \
140+
python -m pip install --user "$(head bdist_name)[fms-accel]"; \
141+
python -m fms_acceleration.cli install fms_acceleration_peft; \
142+
fi
143+
144+
RUN if [[ "${ENABLE_AIM}" == "true" ]]; then \
137145
python -m pip install --user "$(head bdist_name)[aim]"; \
138-
fi && \
146+
fi
147+
139148
# Clean up the wheel module. It's only needed by flash-attn install
140-
python -m pip uninstall wheel build -y && \
149+
RUN python -m pip uninstall wheel build -y && \
141150
# Cleanup the bdist whl file
142151
rm $(head bdist_name) /tmp/bdist_name
143152

0 commit comments

Comments
 (0)