From a5dd016384e7f6b02631a86f901510c1a12137da Mon Sep 17 00:00:00 2001 From: Charles Beauville Date: Sun, 29 Dec 2024 00:28:37 +0100 Subject: [PATCH] refactor(framework) Remove unused scripts (#4645) --- dev/check-requirements-txt.sh | 34 -------------------------------- dev/generate-requirements-txt.sh | 26 ------------------------ dev/install-cuda-step-1.sh | 19 ------------------ dev/install-cuda-step-2.sh | 16 --------------- dev/plot.sh | 7 ------- 5 files changed, 102 deletions(-) delete mode 100755 dev/check-requirements-txt.sh delete mode 100755 dev/generate-requirements-txt.sh delete mode 100755 dev/install-cuda-step-1.sh delete mode 100755 dev/install-cuda-step-2.sh delete mode 100755 dev/plot.sh diff --git a/dev/check-requirements-txt.sh b/dev/check-requirements-txt.sh deleted file mode 100755 index e9e48a978671..000000000000 --- a/dev/check-requirements-txt.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# Copyright 2023 Flower Labs GmbH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================== - -set -e -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ - -# Regenerate requirements.txt files for examples in case they changed -echo "Regenerate requirements.txt files in case they changed" -./dev/generate-requirements-txt.sh 2> /dev/null - -# Fail if user forgot to sync requirements.txt and pyproject.toml -CHANGED=$(git diff --name-only HEAD examples) - -if [ -n "$CHANGED" ]; then - echo "Changes detected, requirements.txt and pyproject.toml is not synced. Please run the script dev/generate-requirements-txt." - exit 1 -fi - -echo "No changes detected" -exit 0 diff --git a/dev/generate-requirements-txt.sh b/dev/generate-requirements-txt.sh deleted file mode 100755 index f78e368e9cfa..000000000000 --- a/dev/generate-requirements-txt.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Copyright 2023 Flower Labs GmbH. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ============================================================================== - -set -e -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ - -# Purpose of this script is to regenerate requirements.txt -for path in $(find ./examples -type f -name 'pyproject.toml' | sed -E 's|/[^/]+$||' |sort -u) -do - echo -e "\nRunning pipreqs for example in ${path}" - pipreqs --mode 'compat' --force --ignore .venv,poetry.lock $path -done diff --git a/dev/install-cuda-step-1.sh b/dev/install-cuda-step-1.sh deleted file mode 100755 index b4159e68401d..000000000000 --- a/dev/install-cuda-step-1.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -set -e -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ - -# Adapted from: https://www.tensorflow.org/install/gpu - -# Add NVIDIA package repositories -wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb -sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub -sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb -sudo apt-get update -wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb -sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb -sudo apt-get update - -# Install NVIDIA driver -sudo apt-get install --no-install-recommends nvidia-driver-430 - -# Reboot. Check that GPUs are visible using the command: nvidia-smi diff --git a/dev/install-cuda-step-2.sh b/dev/install-cuda-step-2.sh deleted file mode 100755 index cacd52b5b268..000000000000 --- a/dev/install-cuda-step-2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -set -e -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ - -# Adapted from: https://www.tensorflow.org/install/gpu - -# Install development and runtime libraries (~4GB) -sudo apt-get install --no-install-recommends \ - cuda-10-1 \ - libcudnn7=7.6.4.38-1+cuda10.1 \ - libcudnn7-dev=7.6.4.38-1+cuda10.1 - -# Install TensorRT. Requires that libcudnn7 is installed above. -sudo apt-get install -y --no-install-recommends libnvinfer6=6.0.1-1+cuda10.1 \ - libnvinfer-dev=6.0.1-1+cuda10.1 \ - libnvinfer-plugin6=6.0.1-1+cuda10.1 diff --git a/dev/plot.sh b/dev/plot.sh deleted file mode 100755 index de0082fcc095..000000000000 --- a/dev/plot.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -e -cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/../ - -# Generate plots -python -m flwr_experimental.baseline.tf_fashion_mnist.gen_plots -python -m flwr_experimental.baseline.tf_fashion_mnist.fn_plots