"tests/nn/git@developer.sourcefind.cn:OpenDAS/fairscale.git" did not exist on "9f347f373e32ee5cad11a40b70b8e28a74b5e2d4"
Unverified Commit 2fe0c2d0 authored by Nikita Shulga's avatar Nikita Shulga Committed by GitHub
Browse files

Delete stale packaging scripts (#5433)

* Delete stale packaging scripts

`osx_wheel.sh` and `linux_manywheel.sh` has not been functional for a
while and are not referenced from any of the CI scripts

Updated `README.md` to reflect how release binary builds are currently run
parent 52e6bd08
# Building torchvision packages for release # Building torchvision packages for release
## Anaconda packages TorchVision release packages are built by using `build_wheel.sh` and `build_conda.sh` for all permutations of
supported operating systems, compute platforms and python versions.
### Linux OS/Python/Compute matrix is defined in https://github.com/pytorch/vision/blob/main/.circleci/regenerate.py
```bash
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/conda-cuda bash
pushd remote/conda
./build_vision.sh 9.0
./build_vision.sh 10.0
./build_vision.sh cpu
# copy packages over to /remote
# exit docker
# anaconda upload -u pytorch torchvision*.bz2
```
### OSX
```bash
# create a fresh anaconda environment / install and activate it
conda install -y conda-build anaconda-client
./build_vision.sh cpu
# copy packages over to /remote
# exit docker
# anaconda upload -u pytorch torchvision*.bz2
```
### Windows
```bash
# Open `Git Bash` and change dir to `conda`
./build_vision.sh 9.0
./build_vision.sh 10.0
./build_vision.sh cpu
# copy packages to a output directory
# anaconda upload -u pytorch torchvision*.bz2
```
## Wheels
### Linux
pushd wheel
```bash
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/manylinux-cuda90:latest bash
cd remote
./linux_manywheel.sh cu90
rm -rf /usr/local/cuda*
./linux_manywheel.sh cpu
```
```bash
nvidia-docker run -it --ipc=host --rm -v $(pwd):/remote soumith/manylinux-cuda100:latest bash
cd remote
./linux_manywheel.sh cu100
```
wheels are in the folders `cpu`, `cu90`, `cu100`.
You can upload the `cu90` wheels to twine with `twine upload *.whl`.
Which wheels we upload depends on which wheels PyTorch uploads as default, and right now, it's `cu90`.
### OSX
```bash
pushd wheel
./osx_wheel.sh
```
### Windows
```cmd
set PYTORCH_REPO=pytorch
pushd windows
call build_vision.bat 90 0.3.0 1
call build_vision.bat 100 0.3.0 1
call build_vision.bat cpu 0.3.0 1
```
wheels are in the current folder.
You can upload them to twine with `twine upload *.whl`
#!/bin/bash
set -ex
if [ "$#" -ne 1 ]; then
echo "Illegal number of parameters. Pass cuda version"
echo "CUDA version should be cu92, cu100 or cpu"
exit 1
fi
export CUVER="$1" # cu[0-9]* cpu
if [[ "$CUVER" == "cu102" ]]; then
cu_suffix=""
else
cu_suffix="+$CUVER"
fi
export OUT_DIR="/remote/$CUVER"
pushd /opt/python
DESIRED_PYTHON=(*/)
popd
for desired_py in "${DESIRED_PYTHON[@]}"; do
python_installations+=("/opt/python/$desired_py")
done
OLD_PATH=$PATH
cd /tmp
rm -rf vision
git clone https://github.com/pytorch/vision
cd /tmp/vision
for PYDIR in "${python_installations[@]}"; do
export PATH=$PYDIR/bin:$OLD_PATH
pip install --upgrade pip
pip install numpy pyyaml future
pip uninstall -y torch || true
pip uninstall -y torch_nightly || true
export TORCHVISION_PYTORCH_DEPENDENCY_NAME=torch_nightly
pip install torch_nightly -f https://download.pytorch.org/whl/nightly/$CUVER/torch_nightly.html
# CPU/CUDA variants of PyTorch have ABI compatible PyTorch for
# the CPU only bits. Therefore, we
# strip off the local package qualifier, but ONLY if we're
# doing a CPU build.
if [[ "$CUVER" == "cpu" ]]; then
export TORCHVISION_PYTORCH_DEPENDENCY_VERSION="$(pip show torch_nightly | grep ^Version: | sed 's/Version: \+//' | sed 's/+.\+//')"
else
export TORCHVISION_PYTORCH_DEPENDENCY_VERSION="$(pip show torch_nightly | grep ^Version: | sed 's/Version: \+//')"
fi
echo "Building against ${TORCHVISION_PYTORCH_DEPENDENCY_VERSION}"
pip install ninja
python setup.py clean
python setup.py bdist_wheel
mkdir -p $OUT_DIR
cp dist/*.whl $OUT_DIR/
done
if [[ ":$PATH:" == *"conda"* ]]; then
echo "existing anaconda install in PATH, remove it and run script"
exit 1
fi
# download and activate anaconda
rm -rf ~/minconda_wheel_env_tmp
wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh && \
chmod +x Miniconda3-latest-MacOSX-x86_64.sh && \
./Miniconda3-latest-MacOSX-x86_64.sh -b -p ~/minconda_wheel_env_tmp && \
rm Miniconda3-latest-MacOSX-x86_64.sh
. ~/minconda_wheel_env_tmp/bin/activate
export OUT_DIR=~/torchvision_wheels
export MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++
pushd /tmp
rm -rf vision
git clone https://github.com/pytorch/vision
pushd vision
desired_pythons=( "3.7" "3.8" "3.9" )
# for each python
for desired_python in "${desired_pythons[@]}"
do
# create and activate python env
env_name="env$desired_python"
conda create -yn $env_name python="$desired_python"
conda activate $env_name
pip uninstall -y torch || true
pip uninstall -y torch_nightly || true
export TORCHVISION_PYTORCH_DEPENDENCY_NAME=torch_nightly
pip install torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
export TORCHVISION_PYTORCH_DEPENDENCY_VERSION="$(pip show torch_nightly | grep ^Version: | sed 's/Version: *//')"
echo "Building against ${TORCHAUDIO_PYTORCH_DEPENDENCY_VERSION}"
# install torchvision dependencies
pip install ninja scipy pytest
python setup.py clean
python setup.py bdist_wheel
mkdir -p $OUT_DIR
cp dist/*.whl $OUT_DIR/
done
popd
popd
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment