Skip to content

Commit

Permalink
Merge pull request #19 from gaelforget/reduce_size
Browse files Browse the repository at this point in the history
skip octave,r,warmup -- add patch_MITgcm
  • Loading branch information
gaelforget authored Oct 11, 2024
2 parents ee40a35 + 5c668ba commit d491a1d
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/binder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- Climatology_plus_cmake_bis
- reduce_size
jobs:
binder:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ RUN echo 'alias julia="${mainpath}/.juliaup/bin/julia --project=${mainpath}"' >>
RUN conda config --env --add channels conda-forge
RUN conda config --env --add channels r
RUN conda install numpy xarray pandas
RUN conda install octave_kernel texinfo r-irkernel

RUN curl -fsSL https://install.julialang.org | sh -s -- --yes

RUN ${mainpath}/.juliaup/bin/julia --project=${mainpath} -e "import Pkg; Pkg.instantiate();"
RUN ${mainpath}/.juliaup/bin/julia --project=${mainpath} -e "import Pkg; Pkg.update(); Pkg.instantiate();"
RUN ${mainpath}/.juliaup/bin/julia --project=${mainpath} ${mainpath}/src/warmup.jl

RUN jupyter lab build && \
Expand Down
2 changes: 1 addition & 1 deletion binder/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
### DO NOT EDIT THIS FILE! This Is Automatically Generated And Will Be Overwritten ###
FROM gaelforget/ecco-docker:09d4f28433a1
FROM gaelforget/ecco-docker:8699540460fd
14 changes: 14 additions & 0 deletions src/patch_MITgcm.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
let
import MITgcm, Downloads

url0="https://raw.githubusercontent.com/MITgcm/MITgcm/refs/heads/master/"
url1=url0*"tools/build_options/linux_arm64_gfortran"
url2=url0*"tools/genmake2"

path0=MITgcm.default_path()
path1=joinpath(path0,"tools","build_options","linux_arm64_gfortran")
path2=joinpath(path0,"tools","genmake2")

Downloads.download(url1,path1)
Downloads.download(url2,path2)
end
16 changes: 13 additions & 3 deletions src/warmup.jl
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
using Pluto, CairoMakie, Downloads, IJulia, Pkg

using Pluto, CairoMakie, Downloads, IJulia, Pkg
import MITgcm, Climatology
import MITgcm.ClimateModels, MITgcm.MeshArrays
import MITgcm.ClimateModels.git

ENV["DATADEPS_ALWAYS_ACCEPT"]=true
MITgcm.set_environment_variables_to_default()

## need to download and patch MITgcm
# https://github.com/MITgcm/MITgcm/pull/849
include("patch_MITgcm.jl")

##

if false

import MITgcm.ClimateModels, MITgcm.MeshArrays
import MITgcm.ClimateModels.git

##

p0=pathof(MITgcm)
Expand Down Expand Up @@ -52,3 +61,4 @@ Pkg.instantiate()
include(nb)
Pkg.activate()

end #if false

0 comments on commit d491a1d

Please sign in to comment.