Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/terasakisatoshi/jlapp
Julia image some application packages included
https://github.com/terasakisatoshi/jlapp
Last synced: about 1 month ago
JSON representation
Julia image some application packages included
- Host: GitHub
- URL: https://github.com/terasakisatoshi/jlapp
- Owner: terasakisatoshi
- Created: 2019-05-09T02:32:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-19T13:56:34.000Z (over 5 years ago)
- Last Synced: 2024-10-11T12:41:06.487Z (2 months ago)
- Language: Dockerfile
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jlapp
Julia image some application packages included[![CircleCI](https://circleci.com/gh/terasakisatoshi/jlapp.svg?style=svg)](https://circleci.com/gh/terasakisatoshi/jlapp)
# terasakisatoshi/jlapp:latest
This docker image provides easy setup of Julia image with Python environment used for PyCall.jl.
This image is based on [Official Julia Image julia:1.1.0](https://hub.docker.com/_/julia) and generated by Dockerfile written in [MyDockerfile for Julia v 1.1.0](https://gist.github.com/terasakisatoshi/7b9373363851d71fe979143e421d80c0)You can try many of Julia application e.g. [Build executable module of Julia script via PackageCompiler](https://gist.github.com/terasakisatoshi/14f8fa8bab35683061306f96b1fcf96f) using our container.
## How to run container (Ubuntu)
```console
$ docker run --rm -it -v $PWD:/work -w /work terasakisatoshi/jlapp:linux julia
```or
```console
$ docker run --rm -it -v $PWD:/work -w /work terasakisatoshi/jlapp:latest julia
```They should get same result
## How to run container (Mac)
```console
$ docker run --rm -it -v $PWD:/work -w /work terasakisatoshi/jlapp:mac julia
```## How to run container (Windows)
- cmd.exe
```console
> docker run --rm -it -v %CD%:/work -w /work terasakisatoshi/jlapp:win10 julia
```- powershell
```
PS> docker run --rm -it -v $PWD:/work -w terasakisatoshi/jlapp:win10 julia
```If you like to run Jupyter its kernel is Julia, you can run:
```
PS> docker run --rm -it -v $PWD:/work -w /work -p 8888:8888 terasakisatoshi/jlapp:win10 jupyter notebook --ip=0.0.0.0 --allow-root
```### Reference:
- [Mount current directory as a volume in Docker on Windows 10](https://stackoverflow.com/questions/41485217/mount-current-directory-as-a-volume-in-docker-on-windows-10)# terasakisatoshi/jlapp:rpi3
For those who would like to use this image on RaspberryPi3 ( note that arm6l system is not supported), we prepared tag named `rpi3` generated by Dockerfile written in [ Dockerfile](https://gist.github.com/terasakisatoshi/b61bb1228a7b0c7260fc8458cde8e68b) .
it includes basic set of Python environment based on [berryconda](https://github.com/jjhelmus/berryconda).## Install Docker on RaspberryPi3
- We will follow installation of Docker based on [The easy way to set up Docker on a Raspberry Pi](https://medium.freecodecamp.org/the-easy-way-to-set-up-docker-on-a-raspberry-pi-7d24ced073ef) .
```console
# terminal on your Raspberry pi
$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
$ sudo groupadd docker
$ sudo gpasswd -a $USER docker
```O.K. Now you can call `docker` from your terminal on your RaspberryPi
## Run container
```
$ docker run --rm -it -v $PWD:/work -w /work terasakisatoshi/jlapp:rpi3 julia
```## Run container with GUI environment
If you like to run our Docker container on [Raspbian Stretch with desktop](https://www.raspberrypi.org/downloads/raspbian/) to visualize image or graph via `Images.jl or Plots.jl`, create bash script like this:
```
cat run_container.sh
xhost +local:docker
docker run --rm -it \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v $(pwd):/work \
-w /work \
terasakisatoshi/jlapp:rpi3 bash
xhost -local:docker
```Then, initialize julia session after running this script
```
$ bash run_container.sh
#root@xxxxxxx:/work#julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.3 (2018-12-18)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/
julia> versioninfo()
Julia Version 1.0.3
Commit 099e826241 (2018-12-18 01:34 UTC)
Platform Info:
OS: Linux (arm-linux-gnueabihf)
CPU: ARMv7 Processor rev 4 (v7l)
WORD_SIZE: 32
LIBM: libm
LLVM: libLLVM-6.0.0 (ORCJIT, cortex-a53)
Environment:
JULIA_PATH = /usr/local/julia
JULIA_GPG = 3673DF529D9049477F76B37566E3C7DC03D6E495
JULIA_VERSION = 1.0.3
julia> # this is sample code
julia> using Plots
julia> using TestImages
julia> plot(testimage("cameraman"))
```## Run container on CUI
If you like to run on [Raspbian Stretch Lite](https://www.raspberrypi.org/downloads/raspbian/) i.e. only CUI environment, you need add `--privileged` option to visualize image using `fbi`
```
$ cat run_container.sh
sudo docker run --rm -it --privileged \
-v ${PWD}:/work \
-w /work \
terasakisatoshi/jlapp:linux bash
$ bash run_container.sh
root@xxxxxxx # julia
julia > savefig(plot(sin, -pi, pi), "sin_curve.png")
julia> exit()
root@xxxxxxx # fbi -T 1 -t 1 -1 sin_curve.png
```## Run condainer with CUI environment and visualize image from SSH client
```
# on Mac terminal
# note that -X is very important
$ ssh -X [email protected]
# on RPI3 terminal
$ cat run_container.sh
docker run --rm -it \
-e DISPLAY=$DISPLAY \
-v $HOME/.Xauthority:/root/.Xauthority:rw \
--net host \
-v $(pwd):/work \
-w /work \
terasakisatoshi/jlapp:rpi3 bash
$ bash run_container.sh
root@xxxxxx# display your_image.png
```## Restriction
jlapp:rpi3 contains `ImageView`, but we can't build because of issue of `Gtk` or `Cairo` package
# To Do list
- Disclose Dockerfile on my GitHub not gist to maintain its version
- Connect GitHub
- add numerical computation packages
- QuadGK
- HCubature# license
View [license information](https://julialang.org/) for the software contained in this image.
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](https://github.com/docker-library/repo-info/tree/master/repos/julia).
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.