Skip to content

Commit

Permalink
fIx read only julia depot
Browse files Browse the repository at this point in the history
  • Loading branch information
danlooo committed Dec 11, 2024
1 parent ea10bc8 commit 0ee64c8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
12 changes: 7 additions & 5 deletions ogc-app-cwl/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM julia:1.11.2-bookworm
WORKDIR /work

ENV JULIA_PROJECT=/work
ENV JULIA_NUM_THREADS=auto

COPY Project.toml .
COPY Manifest.toml .
RUN julia -e 'using Pkg; Pkg.instantiate()'
ENV JULIA_DEPOT_PATH=/.julia
RUN julia -e 'using Pkg; Pkg.activate("/.julia/environments/v1.11"); Pkg.instantiate(); Pkg.status()'
COPY Project.toml /.julia/environments/v1.11/
COPY Manifest.toml /.julia/environments/v1.11/
RUN julia -e 'using Pkg; Pkg.activate("/.julia/environments/v1.11"); Pkg.instantiate(); Pkg.status()'
ENV JULIA_DEPOT_PATH=~/.julia:/.julia

ADD run.jl ./
ENTRYPOINT ["/work/run.jl"]
ENTRYPOINT ["/work/run.jl"]
9 changes: 2 additions & 7 deletions ogc-app-cwl/fairsendd.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $graph:
outputs:
out_cube:
doc: Path to output zarr data cube
type: string
type: File
outputSource: rqa/out_cube

steps:
Expand Down Expand Up @@ -49,12 +49,7 @@ $graph:

outputs:
out_cube:
type: string
outputBinding:
glob: stdout.txt
outputEval: self[0].contents
loadContents: true
stdout: stdout.txt
type: stdout
id: cmd-rqa
$namespaces:
edam: http://edamontology.org/
Expand Down
5 changes: 3 additions & 2 deletions ogc-app-cwl/run.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env -S julia --color=yes --startup-file=no --project=. --threads=auto
#!/usr/bin/env -S julia --color=yes --startup-file=no --threads=auto

using YAXArrays: YAXDefaults
using Pkg
using Glob: glob
using YAXArrays: YAXDefaults
using ArgParse
using RQADeforestation: gdalcube, rqatrend
using DimensionalData: (..)
Expand Down
9 changes: 6 additions & 3 deletions ogc-app-cwl/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#! /usr/bin/env sh

docker build . -t danlooo/cwl-example
docker push danlooo/cwl-example
cwltool example.cwl#add-numbers -a 1.2 -b 3.4
docker build . -t danlooo/fairsendd
docker push danlooo/fairsendd

cwltool fairsendd.cwl#rqa --continent AF --tile E036N075T3
docker run danlooo/fairsendd AF E036N075T3
docker run --env=HOME=/tmp/YgEokx --user 1234:1234 danlooo/fairsendd AF E036N075T3

0 comments on commit 0ee64c8

Please sign in to comment.