yourmainPC $ ssh pi@raspberrypi.local # Assume You are going to login to your Pi via SSH
pi@raspberrypi $ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
pi@raspberrypi $ sudo gpasswd -a $USER docker # if you like to skip `sudo`
pi@raspberrypi $ exit
yourmainPC $ ssh pi@raspberrypi.local # login again
pi@raspberrypi $ JL_VERSION=v1.5.1
pi@raspberrypi $ IMAGE_NAME=terasakisatoshi/jlcross:rpi3-${JL_VERSION}
pi@raspberrypi $ CONTAINER_NAME=jltmp_${JL_VERSION}
pi@raspberrypi $ docker run --name ${CONTAINER_NAME} $IMAGE_NAME /bin/bash
pi@raspberrypi $ docker cp ${CONTAINER_NAME}:/home/pi/julia-${JL_VERSION} .
pi@raspberrypi $ docker rm ${CONTAINER_NAME}
pi@raspberrypi $ ls
julia-v1.5.1 # <---- this is it
pi@raspberrypi $ cd julia-v1.5.1/bin
pi@raspberrypi $ ./julia # tada!!!
I’ve made a HelloWorld application that utilizes C++ resources. It runs not only standard platform(e.g. 64bit Windows, Linux, Mac) but also RaspberryPi with armv7l.
Checkout LibHello.jl or run the following commands.
git clone https://github.com/terasakisatoshi/LibHello.jl.git
cd LibHello.jl
julia --project=@. -e 'using Pkg; Pkg.add(url="https://github.com/terasakisatoshi/libhello_jll.jl.git", rev="libhello-v0.1.2+0")'
julia --project=@. -e 'using Pkg; Pkg.add("CxxWrap")'
# Should install libcxxwrap_julia_jll v0.8.2 if you try to run on your RaspberryPi with armv7l,
# otherwise you can pass it since CxxWrap installs libcxxwrap_julia_jll v0.8.0
julia --project=@. -e 'using Pkg; Pkg.add(PackageSpec(name="libcxxwrap_julia_jll", rev="b5edd5de8ab5b80e8f945bf1829048ef7a4feee0"))'
# test out
julia --project=@. -e 'using Pkg; Pkg.test()'
I tried the docker-based installation of Julia v1.5.3 on a Raspberry Pi Zero W 1.1, and it works but shows an error message on startup:
$ julia
WARNING: Error during initialization of module LinearAlgebra:
ErrorException("could not load symbol "openblas_get_config":
/home/pi/apps/julia-v1.5.3/bin/../lib/julia/libblas.so: undefined symbol: openblas_get_config")
So far everything seems to work, but I imagine I’ll eventually run into trouble with whatever is wrong with BLAS. I’m going to try building 1.6-DEV just to see what happens.