Skip to content

Commit

Permalink
fix: repo2docker compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
eroan-marie committed Dec 13, 2024
1 parent c06582f commit 881f2b8
Show file tree
Hide file tree
Showing 5 changed files with 522 additions and 582 deletions.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
-include .env

# Makefile for convenience, (doesn't look for command outputs)
.PHONY: all
all: base-image base-notebook pangeo-notebook pytorch-notebook
Expand Down
26 changes: 16 additions & 10 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -186,16 +186,22 @@ ONBUILD RUN echo "Checking for pip 'requirements.txt'..." \

ONBUILD USER root

ONBUILD COPY resources/layer-cleanup.sh /usr/local/bin
ONBUILD RUN chmod +x /usr/local/bin/layer-cleanup.sh

ONBUILD RUN for script in $(find "resources" -type f -name "install.sh"); do \
chmod +x "$script"; \
echo "Executing $script"; \
bash "$script"; \
layer-cleanup.sh; \
chown -R ${NB_USER}:${NB_USER} ${HOME}; \
done
ONBUILD RUN echo "Copy 'layer-cleanup'..." \
; [ -d binder ] && cd binder \
; [ -d .binder ] && cd .binder \
; cp resources/layer-cleanup.sh /usr/local/bin/ \
; chmod +x /usr/local/bin/layer-cleanup.sh

ONBUILD RUN echo "Executing install scripts..." \
; [ -d binder ] && cd binder \
; [ -d .binder ] && cd .binder \
; for script in $(find "resources" -type f -name "install.sh"); do \
chmod +x "$script"; \
echo "Executing $script"; \
bash "$script"; \
layer-cleanup.sh; \
chown -R ${NB_USER}:${NB_USER} ${HOME}; \
done

ONBUILD USER ${NB_USER}

Expand Down
Loading

0 comments on commit 881f2b8

Please sign in to comment.