-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.47.2 - PeerJ submission (number two)
The initial submission was flagged because I was missing code for the comparison between morloc and other workflow approaches. When I submitted the paper, I had no such code and meant the diagram to be more conceptual. However, the editor's request was quite reasonable. So I reimplemented the case study with bash, python, snakemake and nextflow. This is all in a different repo. This release is needed for the lighter-weight containers I want to share with my reviewers and readers. * made the build static * fixed the dockerfile * exported the vim-syntax file out to its own repo * added a --version option * upgraded to LTS 22.18
- Loading branch information
Showing
10 changed files
with
141 additions
and
216 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
############################################################################### | ||
# Stage 1: Build the morloc compiler | ||
FROM alpine:3.19 as morloc-build | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache git \ | ||
&& apk add --no-cache gmp-dev \ | ||
&& apk add --no-cache build-base \ | ||
&& apk add --no-cache ncurses \ | ||
&& apk add --no-cache curl | ||
|
||
# Build morloc | ||
RUN curl -SL https://get.haskellstack.org/ | sh | ||
|
||
RUN git clone https://github.com/morloc-project/morloc | ||
|
||
# Build morloc | ||
RUN cd morloc && stack install | ||
|
||
|
||
############################################################################### | ||
# Stage 2: Copy just the compiler binary | ||
FROM ubuntu:22.04 AS morloc-base | ||
COPY --from=morloc-build /root/.local/bin/morloc /bin/morloc | ||
|
||
WORKDIR $HOME | ||
|
||
RUN apt-get update | ||
|
||
# Set the timezone, this avoids hanging later on | ||
RUN DEBIAN_FRONTEND=noninteractive TZ=Antarctica/Troll apt-get -y install tzdata | ||
|
||
RUN apt-get install -y r-base python3.10 python3-pip libgsl-dev git | ||
|
||
# Set up Python environment | ||
RUN pip3.10 install pymorlocinternals | ||
|
||
# Set up C++ environment | ||
RUN mkdir -p $HOME/.morloc/include \ | ||
&& git clone https://github.com/morloclib/mlccpptypes $HOME/.morloc/include/mlccpptypes | ||
|
||
# Set up R environment | ||
RUN Rscript -e 'install.packages("remotes", repos = "https://cloud.r-project.org")' | ||
RUN Rscript -e 'remotes::install_github("morloc-project/rmorlocinternals", dependencies=TRUE)' | ||
|
||
# Setup the morloc home | ||
RUN mkdir -p $HOME/.morloc/lib | ||
RUN mkdir -p $HOME/.morloc/tmp | ||
RUN echo "home : $HOME/.morloc" > ~/.morloc/config && \ | ||
echo "library : $HOME/.morloc/lib" >> $HOME/.morloc/config && \ | ||
echo "tmpdir : $HOME/.morloc/tmp" >> $HOME/.morloc/config && \ | ||
echo "lang_python3 : python3" >> $HOME/.morloc/config | ||
|
||
# Install the morloc modules that are required for the morloc tests to pass | ||
RUN morloc install prelude | ||
RUN morloc install types | ||
RUN morloc install conventions | ||
RUN morloc install base | ||
RUN morloc install rbase | ||
RUN morloc install pybase | ||
RUN morloc install cppbase | ||
RUN morloc install math | ||
|
||
RUN apt-get install -y vim | ||
|
||
# Copy over custom vimrc | ||
COPY assets/vimrc /root/.vimrc | ||
COPY assets/README /root/README | ||
|
||
# Set up vim highlighting for morloc | ||
RUN git clone https://github.com/morloc-project/vimmorloc \ | ||
&& mkdir -p ~/.vim/syntax/ \ | ||
&& mkdir -p ~/.vim/ftdetect/ \ | ||
&& cp vimmorloc/loc.vim ~/.vim/syntax/ \ | ||
&& echo 'au BufRead,BufNewFile *.loc set filetype=loc' > ~/.vim/ftdetect/loc.vim \ | ||
&& rm -rf vimmorloc | ||
|
||
RUN git clone https://github.com/morloc-project/morloc \ | ||
&& mv morloc/test-suite/golden-tests ~/tests | ||
|
||
# Cleanup to reduce image size | ||
RUN apt-get clean && rm -rf /var/lib/apt/lists/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Build the required docker image | ||
build: | ||
docker build -t morloc-base . | ||
|
||
# Open a shell | ||
shell: | ||
docker run -w "/root" -it morloc-base /bin/bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This container has a full morloc installation and language support for R, Python3, and C++. | ||
|
||
The ~/tests folder contains a set of tests from the morloc test suite. These may | ||
serve as simplistic examples of morloc scripts. Though they are designed for | ||
testing the language not pedagogy. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
" Jump to the last position when reopening a file | ||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif | ||
|
||
" Load indentation rules and plugins according to the detected filetype. | ||
filetype plugin indent on | ||
syntax on | ||
set showcmd " Show (partial) command in status line. | ||
set showmatch " Show matching brackets. | ||
set ignorecase " Do case insensitive matching | ||
set smartcase " Do smart case matching | ||
set incsearch " Incremental search | ||
set autowrite " Automatically save before commands like :next and :make | ||
set hidden " Hide buffers when they are abandoned | ||
|
||
" An OK colorscheme | ||
colorscheme torte |
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
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
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
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
Oops, something went wrong.