Skip to content

Commit

Permalink
swancustomenvironments: Install missing SparkConnector dependency
Browse files Browse the repository at this point in the history
`requests` is also a SparkConnector dependency
  • Loading branch information
rodrigo-sobral authored and etejedor committed Nov 13, 2024
1 parent 1d6f412 commit f6f17b6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -n "${INSTALL_NXCALS}" ]; then
SPARKCONNECTOR="sparkconnector==$(python -c 'import sparkconnector; print(sparkconnector.__version__)')"
SPARKMONITOR="sparkmonitor==$(python -c 'import sparkmonitor; print(sparkmonitor.__version__)')"
NXCALS="nxcals"
SWANPORTALLOCATOR="swanportallocator" # TODO: Remove swanportallocator installation when the SparkConnector package gets properly updated
SPARKCONNECTOR_DEPENDENCIES="swanportallocator requests" # TODO: Remove swanportallocator and requests installation when the SparkConnector package gets properly updated
fi

# Set up Acc-Py and create the environment
Expand All @@ -19,11 +19,11 @@ eval "${ACTIVATE_ENV_CMD}"

# Install packages in the environment and the same ipykernel that the Jupyter server uses
_log "Installing packages from ${REQ_PATH}..."
pip install -r "${REQ_PATH}" "ipykernel==${IPYKERNEL_VERSION}" ${NXCALS} ${SPARKMONITOR} ${SWANPORTALLOCATOR} 2>&1 | tee -a ${LOG_FILE} # TODO
pip install -r "${REQ_PATH}" "ipykernel==${IPYKERNEL_VERSION}" ${NXCALS} ${SPARKMONITOR} ${SPARKCONNECTOR_DEPENDENCIES} 2>&1 | tee -a ${LOG_FILE} # TODO


# -------------- HACK SECTION --------------
# Install SWANPORTALLOCATOR separately, install SparkConnector without its dependencies and change the configuration file
# Install SPARKCONNECTOR_DEPENDENCIES separately, install SparkConnector without its dependencies and change the configuration file
# TODO: Remove this when the SparkConnector package gets properly updated
if [ -n "${INSTALL_NXCALS}" ]; then
pip install ${SPARKCONNECTOR} --no-deps 2>&1 | tee -a ${LOG_FILE}
Expand Down

0 comments on commit f6f17b6

Please sign in to comment.