All Projects → Julia-Embedded → jlcross

Julia-Embedded / jlcross

Licence: other
Dockerfiles for arm devices e.g. Raspberry Pi Series

Programming Languages

Roff
2310 projects
Dockerfile
14818 projects
Makefile
30231 projects
julia
2034 projects

Projects that are alternatives of or similar to jlcross

Realtek-USB-Wireless-Adapter-Drivers
Realtek USB Wireless Adapter Drivers [0bda:f179] (Kernel 4.15.x ~ 5.9.x)
Stars: ✭ 34 (+36%)
Mutual labels:  raspberrypi, arm-devices
Picluster
A Simplified Docker Swarm or Kubernetes Alternative to Container Scheduling and Orchestration
Stars: ✭ 390 (+1460%)
Mutual labels:  dockerfiles, raspberrypi
dump1090-docker
Run dump1090-fa (Flightaware fork) quickly and easily with Docker!
Stars: ✭ 23 (-8%)
Mutual labels:  raspberrypi
wifi-connect
Easy WiFi setup for Linux devices from your mobile phone or laptop
Stars: ✭ 1,043 (+4072%)
Mutual labels:  raspberrypi
griode
Griode + Novation Launchpad + Raspberry Pi = a music instrument!
Stars: ✭ 116 (+364%)
Mutual labels:  raspberrypi
MobileNetV2-PoseEstimation
Tensorflow based Fast Pose estimation. OpenVINO, Tensorflow Lite, NCS, NCS2 + Python.
Stars: ✭ 99 (+296%)
Mutual labels:  raspberrypi
pi-asciicam
A live stream ASCII webcam server for Raspberry Pis using websockets, written in go.
Stars: ✭ 18 (-28%)
Mutual labels:  raspberrypi
docker-rpi-plex-video-converter
Raspberry PI - Plex Video converter - Docker image (Multiarch)
Stars: ✭ 19 (-24%)
Mutual labels:  raspberrypi
hometop HT3
Pimp your heater.
Stars: ✭ 34 (+36%)
Mutual labels:  raspberrypi
dockerfile-utils
A library and command line interface for formatting and linting Dockerfiles.
Stars: ✭ 17 (-32%)
Mutual labels:  dockerfiles
rpi-docker-letsencrypt-nginx-proxy-companion
RPI-compatible LetsEncrypt companion container for nginx-proxy
Stars: ✭ 42 (+68%)
Mutual labels:  raspberrypi
AdGuard-WireGuard-Unbound-Cloudflare
The Ultimate Network Security Guide 🔒 Protection | 🔎 Privacy | 🚀 Performance on home network 24/7 🕛 Accessible anywhere 🌏
Stars: ✭ 160 (+540%)
Mutual labels:  raspberrypi
pigpio-client
A nodejs client for pigpio socket interface.
Stars: ✭ 24 (-4%)
Mutual labels:  raspberrypi
docker-repo
A repository stores some dockerfiles or docker-compose files for quickly starting service or service cluster.
Stars: ✭ 26 (+4%)
Mutual labels:  dockerfiles
pirrot
A radio repeater controller (supporting both simplex and duplex operation modes) for the RaspberryPi.
Stars: ✭ 25 (+0%)
Mutual labels:  raspberrypi
cpuminer-arm
CPU Miner (minerd) for Raspberry Pi and other ARM based boards
Stars: ✭ 17 (-32%)
Mutual labels:  raspberrypi
dockerfiles
Dockerfile examples.
Stars: ✭ 53 (+112%)
Mutual labels:  dockerfiles
raspiApWlanScripts
Wifi station/AP mode scripts
Stars: ✭ 24 (-4%)
Mutual labels:  raspberrypi
DashGL-Library
Basic Matrix Manipulation Library For OpenGL Written in C
Stars: ✭ 20 (-20%)
Mutual labels:  raspberrypi
root-ro
Read-only root filesystem for Raspbian Stretch (using overlay)
Stars: ✭ 75 (+200%)
Mutual labels:  raspberrypi

jlcross

Dockerfiles for arm devices e.g. Raspberry Pi Series

image

image

About this repository

  • This repository contains several Dockerfiles which build Julia (binary/docker-image) for (some) Arm devices e.g. Raspberry Pi Series (also including Zero) using cross compilation.
  • Since Julia for Arm32bit system bump downs from Tier2 to Tier3, the official homepage does not provide pre-build binary. If you like to use a Julia version of more than 1.4.1, you have to build by yourself.

What we believe.

  • We believe that not a few people want to run Julia on Raspberry Pi.
  • Raspberry Pi was originally used for educational purposes as an inexpensive computer, but it is now used for industrial purposes (e.g. IoT device or edge computing device) as well. Julia is currently the ONLY programming language that is as dynamic, easy to write, like Python and high performance and as good (or faster) than C on Raspberry Pi. If the Julia community ignores Raspberry Pi, it will deprive them of the opportunity to take advantage of Julia's industrial applications.

Wait! Can we REALLY construct an application for RPis?

Wow, really cool. Can I help jlcross ?

  • If you know a lot of Raspberry Pi system or eager to use Julia on your Raspberry Pi, please help/contribute Julia community rather than here.
  • Note that this jlcross repository just only provides Dockerfiles.

How to use

  • We will assume your build machine is
    • Linux machine equipped with high-end CPU
    • macOS (Catalina) e.g. iMac
    • WSL ??? (not tested)

Read the official documentation/repositories.

Prepare environment

  1. Install Docker

For Ubuntu user, you will need install cross compilation tools:

$ apt-get update
$ apt-get install -y qemu-user-static binfmt-support

Thats' all

Try to run Julia

To prove Julia can run on arm devices We've uploaded Docker images on Docker Hub repository named jlcross

  • Install docker image from Docker Hub.
$ docker pull terasakisatoshi/jlcross:rpizero-v1.5.3
Unable to find image 'terasakisatoshi/jlcross:rpizero-v1.5.3' locally
rpizero-v1.5.3: Pulling from terasakisatoshi/jlcross
(start to pull image...)
  • Run Julia script using container
$ cat hello.jl
using Pkg
Pkg.add("Example")
using Example
hello("World")
$ docker run --rm -it -v $PWD:/work -w /work terasakisatoshi/jlcross:rpizero-v1.4.2 julia hello.jl
    Cloning default registries into `~/.julia`
    Cloning registry from "https://github.com/JuliaRegistries/General.git"
      Added registry `General` to `~/.julia/registries/General`
  Resolving package versions...
  Installed Example ─ v0.5.3
   Updating `~/.julia/environments/v1.4/Project.toml`
  [7876af07] + Example v0.5.3
   Updating `~/.julia/environments/v1.4/Manifest.toml`
  [7876af07] + Example v0.5.3

Build Julia on your machine

  • If you'd like to build Julia for your Raspberry Pi3, download, for example, rpi3/Dockerfile-v1.5.3 and run the following command on your terminal to build Docker image which will include Julia binary:
$ docker build -t jl4rpi3 -f Dockerfile-v1.5.3 .
$ docker-compose build --parallel

Get binary from container

  • After building the docker image(or pulling docker image from our Docker Hub repository), you can get Julia binary by copying it from docker container generated by docker image what you've got

Raspberry Pi Zero

  • in this section, you'll know how to get Julia for Raspberry Pi Zero.
# open your terminal e.g. your work station
$ cat get_binary.sh # write shell script by yourself like below:
#!/bin/bash

JL_VERSION=v1.5.3
IMAGE_NAME=terasakisatoshi/jlcross:rpizero-${JL_VERSION}
CONTAINER_NAME=jltmp_${JL_VERSION}
docker run --name ${CONTAINER_NAME} $IMAGE_NAME /bin/bash
docker cp ${CONTAINER_NAME}:/home/pi/julia-${JL_VERSION} .
docker rm ${CONTAINER_NAME}
$ bash get_binary.sh
$ ls
julia-v1.5.3
  • Copy julia-v1.5.3 to your Raspberry Pi zero:
$ scp -r julia-v1.5.3 [email protected]:/home/pi
  • After copying julia-v1.5.3 to your Raspberry Pi, one need install the following dependencies via apt which is almost same as Dockerfile-v1.5.3.
# Open Your Raspberry Pi's terminal
$ sudo apt-get update && \
    sudo apt-get install -y build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config \
    libopenblas-dev \
    liblapack-dev \
    libgmp3-dev \
    libmpfr-dev
$ echo export 'PATH=${HOME}/julia-v1.5.3/bin:${PATH}' >> ~/.bashrc
$ source ~/.bashrc
$ julia # Oh Yes!!!

That's all

Raspberry Pi 3/4

  • Similar to Raspberry Zero, have a try
# open your terminal e.g. your work station
$ cat get_binary.sh # write shell script by yourself like below:
#!/bin/bash

JL_VERSION=v1.5.4
IMAGE_NAME=terasakisatoshi/jlcross:rpi3-${JL_VERSION}
CONTAINER_NAME=jltmp_${JL_VERSION}
docker run --name ${CONTAINER_NAME} $IMAGE_NAME /bin/bash
docker cp ${CONTAINER_NAME}:/home/pi/julia-${JL_VERSION} .
docker rm ${CONTAINER_NAME}
$ bash get_binary.sh
$ ls
julia-v1.5.4
  • You can also build julia v1.6.0-DEV by yourself.

Restriction

  • We can't confirm building Julia version = v1.2.0 and v1.5.4 on Raspberry Pi zero works fine.

    • You'll see some error message with respect to illegal instruction.
    • v1.0.5, v1.1.1, v1.3.1, v1.4.0, v1.4.1, v1.4.2, v1.5.0-rc1, v1.5.0, v1.5.1, v1.5.2, v1.5.3 are O.K.
  • To pass building procedure for Julia v1.5.0, we have to modify contrib/generate_precompile.jl script that omit precompile statements regarding to Pkg installation to avoid this issue armv7l: ptrtoint not supported for non-integral pointers #36062. This modification will increase the latency for users to install arbitrary packages. If you are new to Julia and want to try it on your Raspberry Pi, we strongly recommend to use julia v1.4.2 or v1.5.2 not v1.5.0.

  • We can't build Julia version = v1.2.0 on Raspberry Pi3 using Docker its base image is balenalib/raspberrypi3:buster-20191030 with error message something like:

    • undefined reference to llvm::BasicBlockPass::createPrinterPass(llvm::raw_ostream&, std::string const&) const'

References

References (Japanese blog)

License

  • As with all Dockerfiles, how to build julia, are licensed under the terms of MIT License.

  • As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

    • Some additional license information which was able to be auto-detected might be found in the repo-info repository's julia/ directory.

    • As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].