## I am starting on ubuntu 19.10 ##
sudo mkdir stretch-armhf
sudo debootstrap --arch=armhf stretch stretch-armhf/ http://deb.debian.org/debain
sudo chroot stretch-armhf
mount -t proc proc /proc
## I would try to install vim here ##
apt-get install vim
## find out num of processors ##
nproc
## disable daemons ##
## /usr/sbin/policy-rc.d ##
vim /usr/sbin/policy-rc.d
## add the following to the file and then exit ##
exit 101
## make sure the file has the right permissions ##
sudo chmod 755 /usr/sbin/policy-rc.d
## install some programs here ##
apt-get install libblas3 libatlas-base-dev
apt-get install python3-dev python3-yaml python3-pillow python3-setuptools python3-numpy python3-cffi python3-wheel
## build python 3.7.3 ##
apt-get install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget
wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz
tar xvz Python-3.7.3.tar.xz
cd Python-3.7.3
./configure --enable-optimizations
make
make altinstall
cd ..
## make git ##
wget https://github.com/git/git/archive/v2.25.0.tar.gz
apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
tar xvz v2.25.0.tar.gz
cd v2.25.0
make configure
./configure --prefix=/usr
make all doc info
make install install-doc install-html install-info
cd ..
alias python=python3.7
alias python3=python3.7
python3.7 -m pip install wheel pyyaml setuptools
git clone https://github.com/pytorch/pytorch --recursive
cd pytorch
git checkout v1.4.0
git submodule update --init --recursive
export NO_CUDA=1
export NO_DISTRIBUTED=1
export NO_MKLDNN=1
export BUILD_TEST=0 # for faster builds
export MAX_JOBS=8 # see nproc above
python3.7 setup.py bdist_wheel
## wait 5 to 10 hours ##
## this is where you find the wheel... ##
ls dist/
No comments:
Post a Comment