Skip to content

Commit

Permalink
Fix build issues & tests (#966)
Browse files Browse the repository at this point in the history
* Restore pin for camouglage v0.9 in Dockerfile, newer versions are incompat
* Skip tests for `morpheus.utils.downloader` when `dask.distributed` is not installed.
* Install `cuda-toolkit` not `cudatoolkit`

Authors:
  - David Gardner (https://github.com/dagardner-nv)

Approvers:
  - Eli Fajardo (https://github.com/efajardo-nv)

URL: #966
  • Loading branch information
dagardner-nv authored Jun 6, 2023
1 parent 453ce58 commit 982749f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 4 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ RUN --mount=type=cache,id=apt,target=/var/cache/apt \
rm -rf /var/lib/apt/lists/*

# Install camouflage needed for unittests to mock a triton server
RUN source activate morpheus &&\
npm install -g camouflage-server
# Pin to v0.9 until #967 is resolved
RUN source activate morpheus && \
npm install -g camouflage-server@0.9 && \
npm cache clean --force

# Setup git to allow other users to access /workspace. Requires git 2.35.3 or
# greater. See https://marc.info/?l=git&m=164989570902912&w=2. Only enable for
Expand Down
2 changes: 1 addition & 1 deletion docker/conda/environments/cuda11.8_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ dependencies:
- configargparse=1.5
- cuda-compiler=11.8
- cuda-nvml-dev=11.8
- cudatoolkit=11.8
- cuda-toolkit=11.8
- cudf=23.02
- cupy=11.6.0
- cxx-compiler
Expand Down
13 changes: 12 additions & 1 deletion tests/test_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
from morpheus.utils.downloader import Downloader
from morpheus.utils.downloader import DownloadMethods
from utils import TEST_DIRS
from utils import import_or_skip


@pytest.fixture(autouse=True, scope='session')
def dask_distributed(fail_missing: bool):
"""
Mark tests requiring dask.distributed
"""
yield import_or_skip("dask.distributed",
reason="Downloader requires dask and dask.distributed",
fail_missing=fail_missing)


@pytest.mark.usefixtures("restore_environ")
Expand Down Expand Up @@ -52,7 +63,7 @@ def test_constructor_enum_vals(dl_method: DownloadMethods):
[DownloadMethods.SINGLE_THREAD, DownloadMethods.DASK, DownloadMethods.DASK_THREAD])
def test_constructor_env_wins(dl_method: DownloadMethods):
os.environ['MORPHEUS_FILE_DOWNLOAD_TYPE'] = "multiprocessing"
downloader = Downloader(download_method="single_thread")
downloader = Downloader(download_method=dl_method)
assert downloader.download_method == DownloadMethods.MULTIPROCESSING


Expand Down

0 comments on commit 982749f

Please sign in to comment.