pakdeveloper commited on
Commit
2fcbaa3
·
verified ·
1 Parent(s): 65ca8de

Update Fooocus-main/entrypoint.sh

Browse files
Files changed (1) hide show
  1. Fooocus-main/entrypoint.sh +31 -2
Fooocus-main/entrypoint.sh CHANGED
@@ -1,4 +1,33 @@
1
  #!/bin/bash
2
 
3
- # Start Fooocus server
4
- python launch.py --listen --port 7860
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  #!/bin/bash
2
 
3
+ ORIGINALDIR=/content/app
4
+ # Use predefined DATADIR if it is defined
5
+ [[ x"${DATADIR}" == "x" ]] && DATADIR=/content/data
6
+
7
+ # Make persistent dir from original dir
8
+ function mklink () {
9
+ mkdir -p $DATADIR/$1
10
+ ln -s $DATADIR/$1 $ORIGINALDIR
11
+ }
12
+
13
+ # Copy old files from import dir
14
+ function import () {
15
+ (test -d /import/$1 && cd /import/$1 && cp -Rpn . $DATADIR/$1/)
16
+ }
17
+
18
+ cd $ORIGINALDIR
19
+
20
+ # models
21
+ mklink models
22
+ # Copy original files
23
+ (cd $ORIGINALDIR/models.org && cp -Rpn . $ORIGINALDIR/models/)
24
+ # Import old files
25
+ import models
26
+
27
+ # outputs
28
+ mklink outputs
29
+ # Import old files
30
+ import outputs
31
+
32
+ # Start application
33
+ python launch.py $*