@@ -285,19 +285,16 @@ FROM base as auto-gptq-cache
285
285
COPY --from=auto-gptq-installer /usr/src/auto-gptq-wheel /usr/src/auto-gptq-wheel
286
286
287
287
288
- # # Final Inference Server image ################################################
289
- FROM cuda-runtime as server-release
290
- ARG PYTHON_VERSION
291
- ARG SITE_PACKAGES=/opt/tgis/lib/python${PYTHON_VERSION}/site-packages
288
+ # # Full set of python installations for server release #########################
292
289
293
- # Install C++ compiler (required at runtime when PT2_COMPILE is enabled)
294
- RUN dnf install -y gcc-c++ git && dnf clean all \
295
- && useradd -u 2000 tgis -m -g 0
290
+ FROM cuda-runtime as python-installations
296
291
297
- SHELL ["/bin/bash" , "-c" ]
292
+ ARG PYTHON_VERSION
293
+ ARG SITE_PACKAGES=/opt/tgis/lib/python${PYTHON_VERSION}/site-packages
298
294
299
295
COPY --from=build /opt/tgis /opt/tgis
300
296
297
+ # `pip` is installed in the venv here
301
298
ENV PATH=/opt/tgis/bin:$PATH
302
299
303
300
# Install flash attention v2 from the cache build
@@ -315,13 +312,30 @@ RUN --mount=type=bind,from=auto-gptq-cache,src=/usr/src/auto-gptq-wheel,target=/
315
312
pip install /usr/src/auto-gptq-wheel/*.whl --no-cache-dir
316
313
317
314
# Install server
315
+ # git is required to pull the fms-extras dependency
316
+ RUN dnf install -y git && dnf clean all
318
317
COPY proto proto
319
318
COPY server server
320
319
RUN cd server && make gen-server && pip install ".[accelerate, ibm-fms, onnx-gpu, quantize]" --no-cache-dir
321
320
322
321
# Patch codegen model changes into transformers 4.35
323
322
RUN cp server/transformers_patch/modeling_codegen.py ${SITE_PACKAGES}/transformers/models/codegen/modeling_codegen.py
324
323
324
+
325
+ # # Final Inference Server image ################################################
326
+ FROM cuda-runtime as server-release
327
+ ARG PYTHON_VERSION
328
+ ARG SITE_PACKAGES=/opt/tgis/lib/python${PYTHON_VERSION}/site-packages
329
+
330
+ # Install C++ compiler (required at runtime when PT2_COMPILE is enabled)
331
+ RUN dnf install -y gcc-c++ && dnf clean all \
332
+ && useradd -u 2000 tgis -m -g 0
333
+
334
+ # Copy in the full python environment
335
+ COPY --from=python-installations /opt/tgis /opt/tgis
336
+
337
+ ENV PATH=/opt/tgis/bin:$PATH
338
+
325
339
# Print a list of all installed packages and versions
326
340
RUN pip list -v --disable-pip-version-check --no-python-version-warning
327
341
0 commit comments