Skip to content

Commit 95a5ae8

Browse files
committed
Separate image for julia.
This image contains some of the images i use regularly. Other packages can be installed using Pkg.add in the interactive session.
1 parent cb743f1 commit 95a5ae8

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: julia
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branhces:
6+
- main
7+
paths:
8+
- julia/**
9+
jobs:
10+
build-image:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout-repo
14+
uses: actions/checkout@v3
15+
- name: default-make-rule
16+
run: cd julia && make
17+
18+

julia/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# syntax=docker/dockerfile:1
2+
FROM julia:latest
3+
4+
## Buid with command: docker build -t julia .
5+
##
6+
## Run with command: docker run --rm -it --init --hostname=julia --name=julia --net=mynet julia
7+
8+
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
9+
10+
ARG DEBIAN_FRONTEND=noninteractive
11+
RUN julia -e 'using Pkg;map(Pkg.add,["Distributions","DataFrames","StatsModels","RDatasets","GLM","MixedModels","StatsBase","Plots","StatsPlots","JuMP","HiGHS","SCIP","CSV","DuckDB"])'
12+
13+
CMD [ "julia" ]

julia/Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
SHELL := bash
2+
.ONESHELL:
3+
.SHELLFLAGS := -eu -o pipefail -c
4+
.DELETE_ON_ERROR:
5+
.RECIPEPREFIX = >
6+
7+
MAKEFLAGS += --warn-undefined-variables
8+
MAKEFLAGS += --no-builtin-rules
9+
10+
.PHONY: all clean cleanall
11+
.DEFAULT: all
12+
13+
IMGTAG = julia
14+
## NC <--> NoCache! Run below to see the difference
15+
## bash $ diff <(NC=0 make -n) <(make -n)
16+
17+
all: Dockerfile
18+
> docker buildx build $(if $(NC),--no-cache,) --platform=linux/amd64 --progress=plain -f $< --tag ${IMGTAG} .
19+
20+
clean:
21+
> docker rmi ${IMGTAG}
22+
23+
cleanall: clean
24+
> @echo "Do cleaning here"
25+
26+
27+

0 commit comments

Comments
 (0)