@@ -27,9 +27,10 @@ ARG PYTHON_VERSION
27
27
ARG USER
28
28
ARG USER_UID
29
29
30
+ # Note this works for 3.9, 3.11, 3.12
30
31
RUN dnf remove -y --disableplugin=subscription-manager \
31
32
subscription-manager \
32
- && dnf install -y python${PYTHON_VERSION} procps \
33
+ && dnf install -y python${PYTHON_VERSION} procps g++ python${PYTHON_VERSION}-devel \
33
34
&& ln -s /usr/bin/python${PYTHON_VERSION} /bin/python \
34
35
&& python -m ensurepip --upgrade \
35
36
&& python -m pip install --upgrade pip \
@@ -104,6 +105,7 @@ FROM cuda-devel AS python-installations
104
105
ARG WHEEL_VERSION
105
106
ARG USER
106
107
ARG USER_UID
108
+ ARG ENABLE_FMS_ACCELERATION=false
107
109
108
110
# # Enable Aimstack if requested via ENABLE_AIM set to "true"
109
111
ARG ENABLE_AIM=false
@@ -132,12 +134,19 @@ RUN if [[ -z "${WHEEL_VERSION}" ]]; \
132
134
RUN --mount=type=cache,target=/home/${USER}/.cache/pip,uid=${USER_UID} \
133
135
python -m pip install --user wheel && \
134
136
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 \
137
145
python -m pip install --user "$(head bdist_name)[aim]" ; \
138
- fi && \
146
+ fi
147
+
139
148
# 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 && \
141
150
# Cleanup the bdist whl file
142
151
rm $(head bdist_name) /tmp/bdist_name
143
152
0 commit comments