Skip to content

Commit

Permalink
Update base image version and add mamba cache cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazim-crim committed Oct 25, 2023
1 parent fc339c0 commit 932352f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 2 additions & 1 deletion eo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Unreleased (latest)

Changes:
--------
- ...
- Update base image version in Dockerfile
- Add `mamba` cache cleanup to reduce image size

Fixes:
------
Expand Down
7 changes: 4 additions & 3 deletions eo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM birdhouse/pavics-jupyter-base:0.4.0
FROM birdhouse/pavics-jupyter-base:0.5.0

# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root
Expand All @@ -7,10 +7,11 @@ COPY environment.yml /environment.yml

# update env "birdy"
# use umask 0000 so that package files for the updated environment are usable by the user for the jupyter-conda-extension
RUN umask 0000 && mamba env update -f /environment.yml
RUN umask 0000 && mamba env update -f /environment.yml \
&& mamba clean -a

# Give ownership of the conda cache folder to jenkins, to enable installing packages by the user from JupyterLab
RUN chown -R 1000:1000 /opt/conda/pkgs/cache
RUN mkdir /opt/conda/pkgs/cache && chown -R 1000:1000 /opt/conda/pkgs/cache

# fix logged warning from GDAL sub-package when accessing Sentinel data via SAFE.ZIP
# only problematic here when using the 'root' conda env
Expand Down
3 changes: 2 additions & 1 deletion nlp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Unreleased (latest)

Changes:
--------
- ...
- Update base image version in Dockerfile
- Add `mamba` cache cleanup to reduce image size

Fixes:
------
Expand Down
7 changes: 4 additions & 3 deletions nlp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM birdhouse/pavics-jupyter-base:0.4.0
FROM birdhouse/pavics-jupyter-base:0.5.0

# must update conda env as root, because of a permission error when having pip dependencies in the input yml file
USER root
Expand All @@ -8,7 +8,8 @@ COPY notebook_config.yml /notebook_config.yml

# update env "birdy"
# use umask 0000 so that package files for the updated environment are usable by the user for the jupyter-conda-extension
RUN umask 0000 && mamba env update -f /environment.yml
RUN umask 0000 && mamba env update -f /environment.yml \
&& mamba clean -a

# Set the encoding to UTF-8, this is needed for heideltime to work properly
ENV LANG=C.UTF-8
Expand Down Expand Up @@ -42,7 +43,7 @@ RUN cd heideltime && \
RUN chown -R jenkins heideltime

# Give ownership of the conda cache folder to jenkins, to enable installing packages by the user from JupyterLab
RUN chown -R 1000:1000 /opt/conda/pkgs/cache
RUN mkdir /opt/conda/pkgs/cache && chown -R 1000:1000 /opt/conda/pkgs/cache

# specify user because of problem running start-notebook.sh when being root
USER jenkins
Expand Down

0 comments on commit 932352f

Please sign in to comment.