From 366e90764d1576a36f480bb73235a23756f67bde Mon Sep 17 00:00:00 2001 From: Manuel Schmid Date: Sat, 4 May 2024 14:31:55 +0200 Subject: [PATCH] Revert "fix: use LF as line breaks for Docker entrypoint.sh (#2843)" False alarm, worked as intended before. Sorry for the fuzz. This reverts commit d16a54edd69f82158ae7ffe5669618db33a01ac7. --- entrypoint.sh | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 57b06c6be..d0dba09c2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1 +1,33 @@ -#!/bin/bash ORIGINALDIR=/content/app # Use predefined DATADIR if it is defined [[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data # Make persistent dir from original dir function mklink () { mkdir -p $DATADIR/$1 ln -s $DATADIR/$1 $ORIGINALDIR } # Copy old files from import dir function import () { (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/) } cd $ORIGINALDIR # models mklink models # Copy original files (cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/) # Import old files import models # outputs mklink outputs # Import old files import outputs # Start application python launch.py $* \ No newline at end of file +#!/bin/bash + +ORIGINALDIR=/content/app +# Use predefined DATADIR if it is defined +[[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data + +# Make persistent dir from original dir +function mklink () { + mkdir -p $DATADIR/$1 + ln -s $DATADIR/$1 $ORIGINALDIR +} + +# Copy old files from import dir +function import () { + (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/) +} + +cd $ORIGINALDIR + +# models +mklink models +# Copy original files +(cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/) +# Import old files +import models + +# outputs +mklink outputs +# Import old files +import outputs + +# Start application +python launch.py $*