File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,20 +155,21 @@ apt_get_update()
155155 echo " Package $package is already installed (APT)."
156156 fi
157157 done
158- elif command -v rpm > /dev/null 2>&1 && command -v dnf > /dev/null 2>&1 ; then
159- # If rpm and dnf exist, assume DNF-based system (RHEL/AlmaLinux)
160- for package in " $@ " ; do
161- if ! rpm -q " $package " > /dev/null 2>&1 ; then
162- echo " Package $package not installed. Installing using dnf..."
163- dnf install -y " $package "
164- else
165- echo " Package $package is already installed (DNF)."
166- fi
167- done
168- else
169- echo " Unsupported package manager. Neither APT nor DNF found."
170- return 1
171- fi
158+ elif command -v dnf > /dev/null 2>&1 ; then
159+ for package in " $@ " ; do
160+ if ! dnf list installed " $package " > /dev/null 2>&1 ; then
161+ echo " Package $package not installed. Installing using dnf..."
162+ dnf install -y " $package "
163+ else
164+ echo " Package $package is already installed (DNF)."
165+ fi
166+ done
167+ else
168+ echo " Unsupported package manager. Neither APT nor DNF found."
169+ return 1
170+ fi
171+
172+
172173}
173174
174175install_using_apt () {
@@ -307,6 +308,7 @@ install_using_github() {
307308 install_prev_pwsh $pwsh_url
308309 fi
309310
311+ # downlaod the latest version of powershell and extracting the file to powershell directory
310312 wget https://github.com/PowerShell/PowerShell/releases/download/v${POWERSHELL_VERSION} /${powershell_filename}
311313 mkdir ~ /powershell
312314 tar -xvf powershell-${POWERSHELL_VERSION} -linux-x64.tar.gz -C ~ /powershell
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Run PowerShell command to check installation
4+ pwsh --version & > /dev/null
5+
6+ # Check if the command was successful
7+ if [ $? -eq 0 ]; then
8+ echo " PowerShell is installed."
9+ else
10+ echo " PowerShell is not installed."
11+ exit 1
12+ fi
Original file line number Diff line number Diff line change 1+ FROM almalinux
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ dnf install -y wget
4+ wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && chmod +x /usr/bin/yq
5+ dnf install -y krb5-libs libicu openssl-libs zlib
6+ # Problem: conflicting requests
7+ # - nothing provides krb5 needed by powershell-7.5.0-1.cm.aarch64 from @commandline
8+ latest_release=$( curl -s https://api.github.com/repos/PowerShell/PowerShell/releases/latest) && \
9+ sudo rpmlink=$( echo " $latest_release " | arch=$( arch) yq -r ' [.assets[] | select(.name == ("*" + strenv(arch) + ".rpm")) | .browser_download_url' ][0]) && \
10+ sudo dnf install -y $rpmlink
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -e
4+
5+ # Optional: Import test library
6+ source dev-container-features-test-lib
7+
8+ # Check installation of cuda-nvtx-12-4 (12.4)
9+ check " cuda-12-4+nvtx" test -e ' /usr/local/cuda-12.4/targets/x86_64-linux/include/nvtx3/'
10+
11+ # Verify CUDA toolkit installation
12+ check " nvcc" nvcc --version
13+
14+ # Verify PATH environment variable
15+ check " cuda-path" echo $PATH | grep -q " /usr/local/cuda-12.4/bin"
16+
17+ # Report result
18+ reportResults
You can’t perform that action at this time.
0 commit comments