Skip to content

Changed install scripts to be consistent with new python installation method #1417

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

Merged
merged 2 commits into from
May 12, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 0 additions & 7 deletions docker/Dockerfile.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
# run build scripts
RUN ${BUILD_DIR}/scripts/generate_datafed.sh

# Install the configured Python version
RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt install -y "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-dev" "python${DATAFED_PYTHON_VERSION}-venv" "python${DATAFED_PYTHON_VERSION}-distutils"

# Web dependencies
COPY ./scripts/install_ws_dependencies.sh ${BUILD_DIR}/scripts/
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_dependencies.sh -a -r -z -c
Expand Down
7 changes: 0 additions & 7 deletions repository/docker/Dockerfile.gcs
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,6 @@ COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_authz_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/copy_dependency.sh ${BUILD_DIR}/scripts/

# Install the configured Python version
RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the motivation for using the deadsnakes PPA for Python installation rather than the default Ubuntu repositories?

RUN apt update
RUN apt install -y "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-dev" "python${DATAFED_PYTHON_VERSION}-venv" "python${DATAFED_PYTHON_VERSION}-distutils"

RUN ${BUILD_DIR}/scripts/generate_datafed.sh
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh

Expand Down
12 changes: 12 additions & 0 deletions scripts/dependency_install_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,18 @@ else
fi
fi

install_python() {
if [ ! -e "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.python_installed-${DATAFED_PYTHON_VERSION}" ]; then
apt update
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
apt update
"$SUDO_CMD" apt update

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SUDO piece needs to be added to all of the apt calls.

apt install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt update
apt install -y "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-dev" "python${DATAFED_PYTHON_VERSION}-venv" "python${DATAFED_PYTHON_VERSION}-distutils"

touch "${DATAFED_DEPENDENCIES_INSTALL_PATH}/.python_installed-${DATAFED_PYTHON_VERSION}"
fi
}

init_python() {

if [[ ! -v DATAFED_PYTHON_DEPENDENCIES_DIR ]]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_authz_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ packages=("host" "libtool" "build-essential" "g++" "gcc" "autoconf"
pip_packages=("setuptools" "distro" "jwt" "globus_sdk")
externals=("cmake" "protobuf" "libsodium" "libzmq" )

install_python

local_UNIFY=false

if [ $# -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_client_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ source "${PROJECT_ROOT}/scripts/dependency_install_functions.sh"
packages=("pkg-config" "python${DATAFED_PYTHON_VERSION}" "python${DATAFED_PYTHON_VERSION}-venv")
pip_packages=("setuptools")

install_python

sudo_command
# This script will install all of the dependencies needed by DataFed 1.0
"$SUDO_CMD" apt-get update
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_core_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pip_packages=("setuptools")
externals=("cmake" "nlohmann_json" "json_schema_validator" "protobuf"
"libsodium" "libzmq" "libopenssl" "zlib" "libcurl")

install_python

local_UNIFY=false

if [ $# -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_repo_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ packages=("libtool" "wget" "build-essential" "g++" "gcc" "libboost-all-dev" "pkg
pip_packages=("setuptools")
externals=("cmake" "protobuf" "libsodium" "libzmq")

install_python

local_UNIFY=false

if [ $# -eq 1 ]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/install_ws_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ source "${PROJECT_ROOT}/scripts/dependency_install_functions.sh"
packages=("curl" "python${DATAFED_PYTHON_VERSION}" "g++" "make" "wget")
externals=("cmake" "nvm" "node" "ws_node_packages")

install_python

Help()
{
echo "$(basename $0) install web dependencies."
Expand Down