Skip to content

Commit

Permalink
fix: use LF as line breaks for Docker entrypoint.sh (lllyasviel#2843)
Browse files Browse the repository at this point in the history
adjusted for Linux again, see lllyasviel#2836
  • Loading branch information
mashb1t authored May 1, 2024
1 parent e2f9bcb commit d16a54e
Showing 1 changed file with 1 addition and 33 deletions.
34 changes: 1 addition & 33 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,33 +1 @@
#!/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 $*
#!/bin/bashORIGINALDIR=/content/app# Use predefined DATADIR if it is defined[[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data# Make persistent dir from original dirfunction mklink () { mkdir -p $DATADIR/$1 ln -s $DATADIR/$1 $ORIGINALDIR}# Copy old files from import dirfunction import () { (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/)}cd $ORIGINALDIR# modelsmklink models# Copy original files(cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/)# Import old filesimport models# outputsmklink outputs# Import old filesimport outputs# Start applicationpython launch.py $*
Expand Down

0 comments on commit d16a54e

Please sign in to comment.