Last active
December 7, 2021 07:24
-
-
Save terasakisatoshi/3f8a55391b1fc22a5db4a43da8d92c98 to your computer and use it in GitHub Desktop.
Build Julia for RaspberryPi Zero
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config git | |
apt install libopenblas-base libopenblas-dev | |
apt install libatlas3-base libatlas-base-dev | |
apt install liblapack-dev | |
apt install libmpfr-dev libgmp3-dev | |
apt install libgfortran3 | |
git clone --depth=1 -b v1.1.0 https://github.com/JuliaLang/julia.git julia | |
cp Make.user julia | |
cd julia && make OPENBLAS_USE_THREAD=0 -j 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo rm -rf julia | |
sudo docker run --rm -it -v $PWD:/home/pi/work -w /home/pi/work balenalib/raspberry-pi:stretch bash build.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JULIA_CPU_TARGET=arm1176jzf-s | |
prefix=/home/pi/work/julia-1.1.0 | |
override USE_SYSTEM_BLAS=1 | |
override USE_SYSTEM_LAPACK=1 | |
override USE_SYSTEM_LIBM=1 | |
override USE_SYSTEM_GMP=1 | |
override USE_SYSTEM_MPFR=1 |
License
This instruction how to build julia is licensed under the terms of MIT License.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage
build Julia from source
install docker and docker-machine
pull base image of PiZero series
It will generate
julia-1.1.0
that contains Julia binary or runtime as same as you can get from https://julialang.org/downloads/install julia on your RaspberryPi
copy
julia-1.1.0
into your RaspberryPi e.g. usingscp
# your main machine other than RaspberryPi scp -r julia-1.1.0 pi@raspberrypi.local/home/pi
On your RaspberryPi, Install packages as same as that written in
build.sh
Finally, add Julia's path at
.bashrc
. That's all.Reference
Binary
here is my google drive link that provides julia (v1.1.0) binary (NOT OFFICIAL) for Raspberry Pi series.