Skip to content

Commit bcbccfe

Browse files
author
Shawn P. Serbin
committed
Final updates to Dockerfiles
1 parent c5870a9 commit bcbccfe

File tree

4 files changed

+48
-51
lines changed

4 files changed

+48
-51
lines changed

arm64_docker_builds.txt

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,21 @@ docker buildx create --name multibuilder --use
3333
# Step 2. Change to local simulation_containers git repo directory
3434
cd /Users/sserbin/Data/GitHub/simulation_containers
3535

36-
# Step 3a. Build an ARM64 compliant version of the ELM docker. This is for local builds only
37-
#docker buildx build --push -t fasstsimulation/elm-builds:elm_v2-for-ngee_arm64 --no-cache \
38-
#--platform linux/arm64 -f docker/elm/elm_v2-for-ngee/Dockerfile_arm64 .
39-
40-
# Step 3b. Build multi-arch ELM
36+
# Step 3a. Build multi-arch ELM
4137
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:elm_v2-for-ngee_multiarch --no-cache \
4238
--platform linux/amd64,linux/arm64 -f docker/elm/elm_v2-for-ngee/Dockerfile_multiarch .
4339

44-
# Step 3c. Build AMD64 and ARM64 compliant version of the serial lib ELM docker. This is for local builds only
45-
docker buildx build --push -t fasstsimulation/elm-builds:elm_v2-for-ngee-serial_multiarch --no-cache \
40+
# Step 3b. Build AMD64 and ARM64 compliant version of the serial lib ELM docker. This is for local builds only
41+
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:elm_v2-for-ngee-serial_multiarch --no-cache \
4642
--platform linux/amd64,linux/arm64 -f docker/elm/elm_v2-for-ngee/Dockerfile_serial_multiarch .
4743

4844

4945

46+
47+
48+
49+
50+
5051
#### Build a multi-platform version of the jupyter-lab simulation_container
5152
# Step 1. Create a new docker builder (only needs to be done once)
5253
docker buildx create --name multibuilder --use

docker/jupyter/Dockerfile_elmlab_3.3.2

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,50 @@
66
# ----------------------------------------------------------------------
77

88
# grab the jupyter-lab container
9-
FROM fasstsimulation/fasst_simulation_tools:fasst_jupyterlab_3.3.2
9+
FROM serbinsh/ngeearctic_elm_containers:ngeearctic_jupyterlab_3.3.2
1010
LABEL maintainer.name="Shawn P. Serbin" \
1111
maintainer.email="[email protected]" \
1212
author.name="Shawn P. Serbin" \
1313
author.email="[email protected]" \
1414
description="ELM Analysis Jupyter-Lab Container"
1515

16-
ENV TOOLS_REPOSITORY_RAW_URL=https://raw.githubusercontent.com/FASSt-simulation/fasst_simulation_tools
16+
ENV REPOSITORY_RAW_URL=https://raw.githubusercontent.com/TESTgroup-BNL/ngeearctic_elm_containers
1717

1818
# Copy in example plotting scripts for use with model output
1919
# add Ben Sulman's matplotlib plotting ascetics defaults
2020
RUN cd "/home/${NB_USER}/scripts" \
21-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/plot_KG64_ELM_output.py \
21+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/plot_KG64_ELM_output.py \
2222
&& chmod 775 plot_KG64_ELM_output.py \
23-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/plot_ELM_output.py \
23+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/plot_ELM_output.py \
2424
&& chmod 775 plot_ELM_output.py \
2525
&& cd "/home/${NB_USER}" \
2626
&& mkdir -p "/home/${NB_USER}/.config/matplotlib" \
2727
&& cd "/home/${NB_USER}/.config/matplotlib" \
28-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/matplotlibrc \
28+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/matplotlibrc \
2929
&& cd "/home/${NB_USER}" \
3030
&& fix-permissions "/home/${NB_USER}"
3131

3232
# Add example jupyter notebook scripts here
3333
RUN cd "/home/${NB_USER}/scripts" \
34-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable.ipynb \
34+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable.ipynb \
3535
&& chmod 775 plot_ELM_variable.ipynb \
36-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable_2D.ipynb \
36+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable_2D.ipynb \
3737
&& chmod 775 plot_ELM_variable_2D.ipynb \
38-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_output.ipynb \
38+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_output.ipynb \
3939
&& chmod 775 plot_ELM_output.ipynb \
40-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_radiation.ipynb \
40+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_radiation.ipynb \
4141
&& chmod 775 plot_ELM_radiation.ipynb \
42-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_moisture_temperature.ipynb \
42+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_moisture_temperature.ipynb \
4343
&& chmod 775 plot_moisture_temperature.ipynb \
44-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_soil_BGC.ipynb \
44+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_soil_BGC.ipynb \
4545
&& chmod 775 plot_soil_BGC.ipynb \
46-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_veg_data.ipynb \
46+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_veg_data.ipynb \
4747
&& chmod 775 plot_veg_data.ipynb \
48-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_ensembles.ipynb \
48+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_ensembles.ipynb \
4949
&& chmod 775 plot_ELM_ensembles.ipynb \
50-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_compare_cases.ipynb \
50+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_compare_cases.ipynb \
5151
&& chmod 775 plot_ELM_compare_cases.ipynb
5252

53-
# add back in if we want examples showing how to run the model from within a notebook
54-
# && wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/run_ELM_KG64_basic.ipynb \
55-
# && chmod 775 run_ELM_KG64_basic.ipynb \
56-
# && wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/run_plot_KG64_ELM_output.ipynb \
57-
# && chmod 775 run_plot_KG64_ELM_output.ipynb
58-
5953
# Setup default user, when enter docker container
6054
USER ${NB_UID}
6155
WORKDIR "${HOME}"

docker/jupyter/Dockerfile_elmlab_gee_3.3.2

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,59 +6,53 @@
66
# ----------------------------------------------------------------------
77

88
# grab the jupyter-lab container
9-
FROM fasstsimulation/fasst_simulation_tools:fasst_jupyterlab_3.3.2_gee
9+
FROM serbinsh/ngeearctic_elm_containers:ngeearctic_jupyterlab_3.3.2_gee
1010
LABEL maintainer.name="Shawn P. Serbin" \
1111
maintainer.email="[email protected]" \
1212
author.name="Shawn P. Serbin" \
1313
author.email="[email protected]" \
1414
description="ELM Analysis Jupyter-Lab Container"
1515

16-
ENV TOOLS_REPOSITORY_RAW_URL=https://raw.githubusercontent.com/FASSt-simulation/fasst_simulation_tools
16+
ENV REPOSITORY_RAW_URL=https://raw.githubusercontent.com/TESTgroup-BNL/ngeearctic_elm_containers
1717

1818
# Copy in example plotting scripts for use with model output
1919
# add Ben Sulman's matplotlib plotting ascetics defaults
2020
RUN cd "/home/${NB_USER}/scripts" \
21-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/plot_KG64_ELM_output.py \
21+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/plot_KG64_ELM_output.py \
2222
&& chmod 775 plot_KG64_ELM_output.py \
23-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/plot_ELM_output.py \
23+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/plot_ELM_output.py \
2424
&& chmod 775 plot_ELM_output.py \
2525
&& cd "/home/${NB_USER}" \
2626
&& mkdir -p "/home/${NB_USER}/.config/matplotlib" \
2727
&& cd "/home/${NB_USER}/.config/matplotlib" \
28-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/elm_scripts/plotting/matplotlibrc \
28+
&& wget $REPOSITORY_RAW_URL/main/scripts/elm_scripts/plotting/matplotlibrc \
2929
&& cd "/home/${NB_USER}" \
3030
&& fix-permissions "/home/${NB_USER}"
3131

3232
# Add example jupyter notebook scripts here
3333
RUN cd "/home/${NB_USER}/scripts" \
34-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable.ipynb \
34+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable.ipynb \
3535
&& chmod 775 plot_ELM_variable.ipynb \
36-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable_2D.ipynb \
36+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_variable_2D.ipynb \
3737
&& chmod 775 plot_ELM_variable_2D.ipynb \
38-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_output.ipynb \
38+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_output.ipynb \
3939
&& chmod 775 plot_ELM_output.ipynb \
40-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_radiation.ipynb \
40+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_radiation.ipynb \
4141
&& chmod 775 plot_ELM_radiation.ipynb \
42-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_moisture_temperature.ipynb \
42+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_moisture_temperature.ipynb \
4343
&& chmod 775 plot_moisture_temperature.ipynb \
44-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_soil_BGC.ipynb \
44+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_soil_BGC.ipynb \
4545
&& chmod 775 plot_soil_BGC.ipynb \
46-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_veg_data.ipynb \
46+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_veg_data.ipynb \
4747
&& chmod 775 plot_veg_data.ipynb \
48-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_ensembles.ipynb \
48+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_ensembles.ipynb \
4949
&& chmod 775 plot_ELM_ensembles.ipynb \
50-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_compare_cases.ipynb \
50+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_compare_cases.ipynb \
5151
&& chmod 775 plot_ELM_compare_cases.ipynb \
5252
# GEE notebooks
53-
&& wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_vs_GEE_data.ipynb \
53+
&& wget $REPOSITORY_RAW_URL/main/notebooks/ngeearctic/plot_ELM_vs_GEE_data.ipynb \
5454
&& chmod 775 plot_ELM_vs_GEE_data.ipynb
5555

56-
# add back in if we want examples showing how to run the model from within a notebook
57-
# && wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/run_ELM_KG64_basic.ipynb \
58-
# && chmod 775 run_ELM_KG64_basic.ipynb \
59-
# && wget $TOOLS_REPOSITORY_RAW_URL/main/notebooks/ngeearctic/run_plot_KG64_ELM_output.ipynb \
60-
# && chmod 775 run_plot_KG64_ELM_output.ipynb
61-
6256
# Setup default user, when enter docker container
6357
USER ${NB_UID}
6458
WORKDIR "${HOME}"

docker/jupyter/README.txt

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22

33
Building dual-platform jupyter-lab containers for analyzing ELM output
44

5-
# 1. First build the main jupyter-lab container, e.g. Jupyter-Lab 3.3.2. Run this within the repo directory
5+
# 1a. First build the main jupyter-lab container, e.g. Jupyter-Lab 3.3.2. Run this within the repo directory
66
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:ngeearctic_jupyterlab_3.3.2 --no-cache \
77
--platform linux/amd64,linux/arm64 -f docker/jupyter/Dockerfile_lab_3.3.2 .
88

9-
# 2. Second build the elmlab container which includes all of the example notebooks. Run this within the repo directorys
9+
# 1b. First build the main jupyter-lab container w/ GEE, e.g. Jupyter-Lab 3.3.2. Run this within the repo directory
10+
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:ngeearctic_jupyterlab_3.3.2_gee --no-cache \
11+
--platform linux/amd64,linux/arm64 -f docker/jupyter/Dockerfile_lab_gee_3.3.2 .
12+
13+
# 2a. Second build the elmlab container which includes all of the example notebooks. Run this within the repo directorys
1014
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:elmlab_3.3.2 --no-cache \
11-
--platform linux/amd64,linux/arm64 -f docker/jupyter/Dockerfile_elmlab_3.3.2 .
15+
--platform linux/amd64,linux/arm64 -f docker/jupyter/Dockerfile_elmlab_3.3.2 .
16+
17+
# 2b. Second build the elmlab container w/ GEE which includes all of the example notebooks. Run this within the repo directorys
18+
docker buildx build --push -t serbinsh/ngeearctic_elm_containers:elmlab_gee_3.3.2 --no-cache \
19+
--platform linux/amd64,linux/arm64 -f docker/jupyter/Dockerfile_elmlab_gee_3.3.2 .

0 commit comments

Comments
 (0)