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

[Universal] - reduce size - removed nvidia, triton - Machine Learning Packages #1014

Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d39040b
[Universal] - reduce size - removed nvidia, triton - from M.L.P
gauravsaini04 Apr 2, 2024
99cae06
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 3, 2024
60f52ad
optional installation for torch ( with gpu acc. / without it )
gauravsaini04 Apr 3, 2024
cacebcd
updated threshold for universal image to 10 GB
gauravsaini04 Apr 3, 2024
bd5d3c7
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 7, 2024
dba42b0
[universal] - reduce size - changed acc. to comments
gauravsaini04 Apr 7, 2024
7513abb
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 9, 2024
921e471
[Universal] - shrunk size - amended based on reviews
gauravsaini04 Apr 9, 2024
7da2a00
more changes acc. to comments
gauravsaini04 Apr 10, 2024
fc8cdb1
few more relevant changes..
gauravsaini04 Apr 10, 2024
051f9a1
final changes
gauravsaini04 Apr 16, 2024
eb8dc73
misc change
gauravsaini04 Apr 16, 2024
9f04d72
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 17, 2024
6caba17
changes for comments
gauravsaini04 Apr 17, 2024
9d4f51c
Merge remote-tracking branch 'refs/remotes/origin/universal_reduce_si…
gauravsaini04 Apr 17, 2024
74fc0db
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 19, 2024
7ab2791
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 22, 2024
1e7d94d
change for comment
gauravsaini04 Apr 22, 2024
e330d59
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 Apr 29, 2024
1d2583a
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 May 2, 2024
4873b23
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 May 3, 2024
6445c78
change for running tests
gauravsaini04 May 3, 2024
62a3039
Merge branch 'main' into universal_reduce_size_mlp_remove_nvidia_triton
gauravsaini04 May 6, 2024
f7d754c
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 May 7, 2024
40e3949
[Universal] - not installing gpu accelerated torch pkg now
gauravsaini04 May 7, 2024
0f9f285
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 May 8, 2024
874a2af
correction to install_python_package fn
gauravsaini04 May 8, 2024
79374f3
image size check should fail
gauravsaini04 May 8, 2024
b612e05
Merge branch 'devcontainers:main' into universal_reduce_size_mlp_remo…
gauravsaini04 May 9, 2024
bd2a41e
[Universal]-shrink size issue-changes as suggested
gauravsaini04 May 9, 2024
d1cc881
Merge remote-tracking branch 'refs/remotes/origin/universal_reduce_si…
gauravsaini04 May 9, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/smoke-universal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
uses: ./.github/actions/smoke-test
with:
image: universal
threshold: 14
threshold: 10
gauravsaini04 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,34 @@ sudo_if() {

export DEBIAN_FRONTEND=noninteractive

install_torch_check_gpu() {
if ! command -v lspci &> /dev/null; then
echo "lspci not found. Attempting to install..."
apt-get update && apt-get install -y pciutils
fi
# Detect GPU
set +e
GPU=$(lspci | grep -i NVIDIA)
set -e
if [ -n "$GPU" ]; then
echo "GPU Detected. Installing Torch with GPU support."
gauravsaini04 marked this conversation as resolved.
Show resolved Hide resolved
sudo_if /usr/local/python/current/bin/python -m pip install --user --upgrade --no-cache-dir torch
else
echo "No GPU Detected. Installing Torch with CPU support."
sudo_if /usr/local/python/current/bin/python -m pip install --user --upgrade --no-cache-dir torch -f https://download.pytorch.org/whl/cpu/torch_stable.html
fi
}

install_python_package() {
PACKAGE=${1:-""}

sudo_if /usr/local/python/current/bin/python -m pip uninstall --yes $PACKAGE
echo "Installing $PACKAGE..."
sudo_if /usr/local/python/current/bin/python -m pip install --user --upgrade --no-cache-dir $PACKAGE
if [[ $PACKAGE == "torch" ]]; then
install_torch_check_gpu
else
sudo_if /usr/local/python/current/bin/python -m pip install --user --upgrade --no-cache-dir $PACKAGE
fi
}

if [[ "$(python --version)" != "" ]] && [[ "$(pip --version)" != "" ]]; then
Expand Down
Loading