Tao Wu commited on
Commit
a5b4383
1 Parent(s): 3b7b792
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. Dockerfile +6 -1
  3. app/data/dump.rdb +3 -0
  4. app/start.sh +3 -0
.gitattributes CHANGED
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.csv filter=lfs diff=lfs merge=lfs -text
37
  *.sqlite3 filter=lfs diff=lfs merge=lfs -text
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  *.csv filter=lfs diff=lfs merge=lfs -text
37
  *.sqlite3 filter=lfs diff=lfs merge=lfs -text
38
+ *.rdb filter=lfs diff=lfs merge=lfs -text
Dockerfile CHANGED
@@ -16,7 +16,12 @@ RUN useradd -m -u 1000 user
16
  WORKDIR /app
17
  COPY app /app
18
 
 
 
 
 
 
19
 
20
  EXPOSE 7860
21
 
22
- CMD ["python", "-u", "app.py"]
 
16
  WORKDIR /app
17
  COPY app /app
18
 
19
+ COPY dump.rdb /var/lib/redis/dump.rdb
20
+ RUN chown redis:redis /var/lib/redis/dump.rdb
21
+
22
+ COPY start.sh /start.sh
23
+ RUN chmod +x /start.sh
24
 
25
  EXPOSE 7860
26
 
27
+ CMD ["/start.sh"]
app/data/dump.rdb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5cb8c9201e80c410d2aac9451678528f6e9a4311dd815a2a167b98663fd42639
3
+ size 48413568
app/start.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ #!/bin/bash
2
+ redis-server --daemonize yes
3
+ exec python -u app.py