Skip to content

Commit

Permalink
Perform apt upgrade during docker build of the models container (#2174
Browse files Browse the repository at this point in the history
)

* Perform an `apt update` and `apt upgrade` during the Docker build picking up any security fixes available.
* Add `urllib3` to `ci/release/download_deps.py` (unrelated fix)


## By Submitting this PR I confirm:
- I am familiar with the [Contributing Guidelines](https://github.com/nv-morpheus/Morpheus/blob/main/docs/source/developer_guide/contributing.md).
- When the PR is ready for review, new or existing tests cover these changes.
- When the PR is ready for review, the documentation is up to date with these changes.

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

Approvers:
  - Will Killian (https://github.com/willkill07)
  - Tad ZeMicheal (https://github.com/tzemicheal)

URL: #2174
  • Loading branch information
dagardner-nv authored Feb 6, 2025
1 parent d7965d6 commit 3c3c2f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ci/release/download_deps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# SPDX-FileCopyrightText: Copyright (c) 2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -99,6 +99,7 @@
'pytorch': 'https://github.com/pytorch/pytorch',
'tqdm': 'https://github.com/tqdm/tqdm',
'typing_utils': 'https://github.com/bojiang/typing_utils',
'urllib3': 'https://github.com/urllib3/urllib3',
'versioneer-518': 'https://github.com/python-versioneer/versioneer-518',
'watchdog': 'https://github.com/gorakhargosh/watchdog',
'websockets': 'https://github.com/python-websockets/websockets',
Expand All @@ -112,9 +113,8 @@
OTHER_REPOS: dict[str, PACKAGE_TO_URL_FN_T] = {
# While boost is available on GitHub, the sub-libraries are in separate repos.
'beautifulsoup4':
lambda name,
ver: ("https://www.crummy.com/software/BeautifulSoup/bs4/download/"
f"{'.'.join(ver.split('.')[:-1])}/{name}-{ver}.tar.gz"),
lambda name, ver: ("https://www.crummy.com/software/BeautifulSoup/bs4/download/"
f"{'.'.join(ver.split('.')[:-1])}/{name}-{ver}.tar.gz"),
}

# Please keep sorted
Expand Down Expand Up @@ -164,6 +164,7 @@
'python-versioneer': TAG_BARE,
'scikit-learn': TAG_BARE,
'sqlalchemy': lambda ver: f"rel_{ver.replace('.', '_')}",
'urllib3': TAG_BARE,
'websockets': TAG_BARE,
}

Expand Down
6 changes: 6 additions & 0 deletions models/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ ARG MORPHEUS_ROOT_HOST

WORKDIR /

RUN apt update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt upgrade -y && \
apt clean && \
rm -rf /var/lib/apt/lists/*

# Copy the model repository
COPY "${MORPHEUS_ROOT_HOST}/models" "./models"

Expand Down

0 comments on commit 3c3c2f5

Please sign in to comment.