
git clone https://github.com/HeGanjie/busybox-httpd-directory-listing
cp -r busybox-httpd-directory-listing/* /tmp
cd /tmp 
chmod +x cgi-bin/main.cgi
busybox httpd -f -p 8080 &

export CMAKE_BUILD_PARALLEL_LEVEL="30"
export MAKEOPTS="-j30"
export PYTORCH_ROCM_ARCH=gfx10
export HSA_OVERRIDE_GFX_VERSION=10.3.0
export BUILD_STATIC_RUNTIME_BENCHMARK=0
export BUILD_BINARY=0
export BUILD_CUSTOM_PROTOBUF=1
export LINKLOCALPROTOBUF=1
linklocalprotobuf=1
export BUILD_SHARED_LIBS=1
export BUILD_TEST=False
export BUILD_JNI=0
export USE_ASAN=0
export USE_TSAN=0
export USE_CPP_CODE_COVERAGE=0
export USE_CUDA=0
export USE_XPU=0
export USE_ROCM=1
export BUILD_NVFUSER=0
export USE_FBGEMM=1
export USE_FAKELOWP=0
export USE_KINETO=1
export USE_GFLAGS=0
export USE_GLOG=0
export USE_LITE_PROTO=0
export USE_ROCM_KERNEL_ASSERT=1
export USE_PYTORCH_METAL=0
export USE_PYTORCH_METAL_EXPORT=0
export USE_MPS=0
export USE_MKL=1
export USE_MKLDNN=1
export USE_MKLDNN_ACL=0
export USE_MKLDNN_CBLAS=0
export USE_UCC=0
export USE_ITT=1
export USE_NCCL=0
export USE_NNPACK=1
export USE_NUMPY=1
export USE_OBSERVERS=0
export USE_OPENCL=0
export USE_OPENMP=1
export USE_MIMALLOC=0
export USE_VULKAN=0
export USE_PROF=0
export USE_PYTORCH_QNNPACK=1
export USE_XNNPACK=1
export USE_DISTRIBUTED=1
export USE_MPI=0
export USE_GLOO=1
export USE_GLOO_WITH_OPENSSL=0
export USE_TENSORPIPE=1
cd /root
mv -f torchvision-release-0.24-git /tmp/torchvision-release-0.24-git
mv -f torchaudio-release-2.9-git /tmp/torchaudio-release-2.9-git 
mv -f pytorch-release-2.9-git /tmp/pytorch-release-2.9-git 
echo "set(CMAKE_C_FLAGS \"\${CMAKE_CXX_FLAGS} -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict\")" >> /tmp/pytorch-release-2.9-git/third_party/fbgemm/CMakeLists.txt
echo "set(CMAKE_CXX_FLAGS \"\${CMAKE_CXX_FLAGS} -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict\")" >> /tmp/pytorch-release-2.9-git/third_party/fbgemm/CMakeLists.txt
cd /tmp/pytorch-release-2.9-git
python tools/amd_build/build_amd.py
mkdir build1
cd build1
mkdir /tmp/bins/libtorch -p
export CMAKE_INSTALL_PREFIX=/tmp/bins/libtorch
python3.13 ../tools/build_libtorch.py
cd build 
make install


hf upload-large-folder --private --repo-type model lainlives/torchstuff  /tmp/bins/*
mkdir ../build2 && cd ../build2
rm -rf ../build1
python3.13 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchaudio-release-2.9-git 
mkdir /buildit && cd buildit
python3.13 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchvision-release-0.24-git 
mkdir /buildit && cd buildit
python3.13 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
rm -rf /tmp/torchvision-release-0.24-git/buildit

cd /tmp/pytorch-release-2.9-git
mkdir buildit && cd buildit
python3.12 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchaudio-release-2.9-git && rm -rf /tmp/pytorch-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.12 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchvision-release-0.24-git && rm -rf torchaudio-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.12 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
rm -rf /tmp/torchvision-release-0.24-git/buildit




cd /tmp/pytorch-release-2.9-git
mkdir buildit && cd buildit
python3.11 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchaudio-release-2.9-git && rm -rf /tmp/pytorch-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.11 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchvision-release-0.24-git && rm -rf torchaudio-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.11 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
rm -rf /tmp/torchvision-release-0.24-git/buildit




cd /tmp/pytorch-release-2.9-git
mkdir buildit && cd buildit
python3.10 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchaudio-release-2.9-git && rm -rf /tmp/pytorch-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.10 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchvision-release-0.24-git && rm -rf torchaudio-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.10 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
rm -rf /tmp/torchvision-release-0.24-git/buildit

cd /tmp/pytorch-release-2.9-git
mkdir buildit && cd buildit
python3.9 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchaudio-release-2.9-git && rm -rf /tmp/pytorch-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.9 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
cd /tmp/torchvision-release-0.24-git && rm -rf torchaudio-release-2.9-git/buildit
mkdir /buildit && cd buildit
python3.9 ../setup.py bdist_wheel
hf upload --private --repo-type model lainlives/torchstuff  *.whl
rm -rf /tmp/torchvision-release-0.24-git/buildit







exit 0
