Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workaround after dependencies have been fixed #649

Merged
merged 6 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion applications/ehr_query_llm/fhir/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fhir.resources~=7.0.0 # avoid conflicting with pydantic ver req'ed by Holoscan
fhir.resources~=7.1.0 # No conflict after Holoscan relaxed pinning dependency versions
holoscan~=2.0
pyzmq~=25.1.0
requests~=2.31.0
19 changes: 13 additions & 6 deletions applications/ehr_query_llm/lmm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2022-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,12 +16,11 @@
# limitations under the License.

ARG BASE_IMAGE
ARG GPU_TYPE
ARG TARGETARCH

############################################################
# Base image
############################################################

FROM ${BASE_IMAGE} as base
ARG DEBIAN_FRONTEND=noninteractive
#
Expand All @@ -42,9 +41,7 @@ RUN apt-get update && \
COPY applications/ehr_query_llm/lmm/requirements*.txt /tmp/

# Install setuptools prior to all other requirements to avoid install errors
# Also, install holoscan first and separately as it pins packaging==23.1
RUN python3 -m pip install --no-cache-dir setuptools && \
python3 -m pip install --no-cache-dir -r /tmp/requirements_hsdk.txt && \
python3 -m pip install --no-cache-dir -r /tmp/requirements.txt

# Clone Llama.cpp and checkout a stable commit
Expand All @@ -57,6 +54,16 @@ RUN git clone https://github.com/ggerganov/llama.cpp.git \
&& cmake .. -DLLAMA_CUBLAS=ON \
&& LLAMA_CUDA_F16=true cmake --build . --config Release

WORKDIR /tmp/pip/
# Install Torch based on the specified architecturea, and if not specified, host's
RUN if [[ $TARGETARCH == x86_64 ]] || [[ $(uname -m) == x86_64 ]]; then \
echo "Installing Torch for x86_64 architecture" && \
python3 -m pip install torch~=2.5.0; \
elif [[ $TARGETARCH == aarch64* ]] || [[ $(uname -m) == aarch64* ]] ; then \
echo "Installing Torch for aarch64 architecture" && \
python3 -m pip install torch==2.6.0 torchvision --index-url https://download.pytorch.org/whl/test/cu126; \
else \
echo "Unknown architecture: $TARGETARCH"; \
exit 1; \
fi

WORKDIR /workspace/holohub
1 change: 1 addition & 0 deletions applications/ehr_query_llm/lmm/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
holoscan>=2.5
nvidia-riva-client==2.13.0
pyaudio==0.2.14
pynput==1.7.6
Expand Down
1 change: 0 additions & 1 deletion applications/ehr_query_llm/lmm/requirements_hsdk.txt

This file was deleted.

6 changes: 3 additions & 3 deletions operators/ehr_query_llm/fhir/resource_sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ def sanitize(data: Dict) -> Optional[Dict]:

try:
model = construct_fhir_element(resource_type, resource)
# If using fhir.resources 0.7.1, then
# pydantic.v1.error_wrappers.ValidationError
except pydantic.error_wrappers.ValidationError:
# If using fhir.resources 7.0.0, then the error type is
# pydantic.error_wrappers.ValidationError
except pydantic.v1.error_wrappers.ValidationError:
logger.error("Validation error while processing: ", resource)
return None

Expand Down
Loading