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 pyarrow_hotfix import from __init__.py #1692

Merged
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
20 changes: 14 additions & 6 deletions ci/conda/recipes/run_conda_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NUMARGS=$#
ARGS=$*

function hasArg {
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
(( ${NUMARGS} != 0 )) && (echo " ${ARGS} " | grep -q " $1 ")
}

function get_version() {
Expand Down Expand Up @@ -99,6 +99,14 @@ CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}nvid
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}pytorch")
CONDA_ARGS_ARRAY+=("-c" "${CONDA_CHANNEL_ALIAS:+"${CONDA_CHANNEL_ALIAS%/}/"}defaults")

if [[ ${NUMARGS} == 0 ]]; then
echo -e "${r}ERROR: No arguments were provided. Please provide at least one package to build. Available packages:${x}"
echo -e "${r} morpheus${x}"
echo -e "${r} pydebug${x}"
echo -e "${r}Exiting...${x}"
exit 12
fi

if hasArg morpheus; then
# Set GIT_VERSION to set the project version inside of meta.yaml
export GIT_VERSION="$(get_version)"
Expand All @@ -110,10 +118,10 @@ if hasArg morpheus; then
fi

if hasArg pydebug; then
export MORPHEUS_PYTHON_VER=$(python --version | cut -d ' ' -f 2)
export MORPHEUS_PYTHON_VER=$(python --version | cut -d ' ' -f 2)

echo "Running conda-build for python-dbg..."
set -x
conda ${CONDA_COMMAND} "${CONDA_ARGS_ARRAY[@]}" ${CONDA_ARGS} ./ci/conda/recipes/python-dbg
set +x
echo "Running conda-build for python-dbg..."
set -x
conda ${CONDA_COMMAND} "${CONDA_ARGS_ARRAY[@]}" ${CONDA_ARGS} ./ci/conda/recipes/python-dbg
set +x
fi
4 changes: 3 additions & 1 deletion docker/build_conda_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ DOCKER_EXTRA_ARGS=()
BUILD_SCRIPT="${BUILD_SCRIPT}
export CONDA_ARGS=\"${CONDA_ARGS[@]}\"
./ci/conda/recipes/run_conda_build.sh "$@"
EXIT_CODE=\$?
chown -R ${CUR_UID}:${CUR_GID} .cache .conda-bld
exit \$EXIT_CODE
"

echo "Running conda build"
Expand All @@ -62,4 +64,4 @@ echo "Running conda build"
DOCKER_EXTRA_ARGS="${DOCKER_EXTRA_ARGS[@]}" ${SCRIPT_DIR}/run_container_dev.sh bash -c "${BUILD_SCRIPT}"

echo "Conda packages have been built. Use the following to install into an environment:"
echo " mamba install -c file://$(realpath ${MORPHEUS_ROOT}/.conda-bld) -c nvidia -c rapidsai -c conda-forge $@"
echo " mamba install -c file://$(realpath ${MORPHEUS_ROOT}/.conda-bld) -c conda-forge -c rapidsai -c rapidsai-nightly -c nvidia -c nvidia/label/dev $@"
5 changes: 4 additions & 1 deletion docker/run_container_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ docker run \
-ti \
${DOCKER_ARGS} ${DOCKER_EXTRA_ARGS} \
${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} "${@:-bash}"
set +x

{ EXIT_CODE=$?; set +x; } 2>/dev/null

exit $EXIT_CODE
7 changes: 0 additions & 7 deletions morpheus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@
import logging
import os

# ########################### CVE-2023-47248 Mitigation ############################
# Import pyarrow_hotfix as early as possible to ensure that the pyarrow hotfix is applied before any code can use it
# Can be removed after upgrading to pyarrow 14.0.1 or later (which is dictated by cudf)
import pyarrow_hotfix

# ##################################################################################

# Create a default null logger to prevent log messages from being propagated to users of this library unless otherwise
# configured. Use the `utils.logging` module to configure Morpheus logging
logging.getLogger(__name__).addHandler(logging.NullHandler())
Expand Down
Loading