Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/DeployPage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- master
- v0p3p17d
- update_page_202509
pull_request:
jobs:
build-and-deploy:
Expand All @@ -20,9 +20,9 @@ jobs:
# python-version: '3.8'
# - run: pip install matplotlib
- name: Install Julia
uses: julia-actions/setup-julia@v1
uses: julia-actions/setup-julia@v2
with:
version: 1.9
version: 1
# NOTE
# Adjust the `input=""` on the last line to indicate where
# the source of the package page is (`page/` by default).
Expand All @@ -49,7 +49,7 @@ jobs:
Pkg.add.(["Pluto", "PlutoUI", "PlutoSliderServer"]);
Pkg.add.(["YAXArrays", "Zarr", "NetCDF", "EarthDataLab"]);
Pkg.add.(["ArchGDAL","Colors","DiskArrays","Dataverse"]);
Pkg.add.(["OceanStateEstimation","IJulia"]);
Pkg.add.(["Climatology","IJulia"]);
include("src/warmup1.jl");
include("tutorials/run_notebooks.jl");'
- name: Build and Deploy
Expand Down
42 changes: 16 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,14 @@
FROM jupyter/base-notebook:latest

USER root
RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.2-linux-x86_64.tar.gz && \
tar -xvzf julia-1.10.2-linux-x86_64.tar.gz && \
mv julia-1.10.2 /opt/ && \
ln -s /opt/julia-1.10.2/bin/julia /usr/local/bin/julia && \
rm julia-1.10.2-linux-x86_64.tar.gz

ENV mainpath ./
RUN mkdir -p ${mainpath}

USER ${NB_USER}

COPY --chown=${NB_USER}:users ./src ${mainpath}/src
COPY --chown=${NB_USER}:users ./src/plutoserver ${mainpath}/plutoserver

RUN cp ${mainpath}/src/setup.py ${mainpath}/setup.py
RUN cp ${mainpath}/src/runpluto.sh ${mainpath}/runpluto.sh
RUN cp ${mainpath}/src/environment.yml ${mainpath}/environment.yml
RUN cp ${mainpath}/src/Project.toml ${mainpath}/Project.toml

ENV USER_HOME_DIR /home/${NB_USER}
ENV JULIA_PROJECT ${USER_HOME_DIR}
ENV JULIA_DEPOT_PATH ${USER_HOME_DIR}/.julia

RUN julia -e "import Pkg; Pkg.Registry.update();"
RUN julia -e "import Pkg; Pkg.instantiate();"

USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential && \
apt-get install -y --no-install-recommends vim && \
apt-get install -y --no-install-recommends curl && \
apt-get install -y --no-install-recommends git-all && \
apt-get install -y --no-install-recommends unzip && \
apt-get install -y --no-install-recommends gfortran && \
Expand All @@ -43,13 +20,26 @@ RUN apt-get update && \

USER ${NB_USER}

RUN echo 'alias julia="${mainpath}/.juliaup/bin/julia --project=${mainpath}"' >> ~/.bashrc
RUN curl -fsSL https://install.julialang.org | sh -s -- --yes

COPY --chown=${NB_USER}:users ./src ${mainpath}/src
COPY --chown=${NB_USER}:users ./src/plutoserver ${mainpath}/plutoserver

RUN cp ${mainpath}/src/setup.py ${mainpath}/setup.py
RUN cp ${mainpath}/src/runpluto.sh ${mainpath}/runpluto.sh
RUN cp ${mainpath}/src/environment.yml ${mainpath}/environment.yml
RUN cp ${mainpath}/src/Project.toml ${mainpath}/Project.toml

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

RUN jupyter lab build && \
jupyter lab clean && \
pip install ${mainpath} --no-cache-dir && \
rm -rf ~/.cache

RUN julia ${mainpath}/src/warmup1.jl
RUN julia ${mainpath}/src/download_notebooks.jl
RUN ${mainpath}/.juliaup/bin/julia --project=${mainpath}/src ${mainpath}/src/warmup1.jl
RUN ${mainpath}/.juliaup/bin/julia --project=${mainpath}/src ${mainpath}/src/download_notebooks.jl

RUN mkdir .dev
RUN mv build plutoserver.egg-info .dev
Expand Down
Loading
Loading