eoeooe commited on
Commit
20de8d7
·
verified ·
1 Parent(s): b9fe82c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -47
Dockerfile CHANGED
@@ -14,50 +14,4 @@ WORKDIR /home/user
14
  COPY --chown=user:user start.sh /home/user/start.sh
15
  RUN chmod +x /home/user/start.sh
16
 
17
- ENTRYPOINT ["/home/user/start.sh"]
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
- #!/bin/bash
27
-
28
- # Configuration from your images
29
- REPO_ID=
30
- HF_TOKEN=""
31
-
32
- echo "--- System Starting ---"
33
-
34
- #
35
- echo "Restoring files from $REPO_ID..."
36
- huggingface-cli download $REPO_ID --local-dir /home/user/storage --repo-type dataset --token $HF_TOKEN
37
-
38
- #
39
- cat <<EOF > /home/user/auto_backup.sh
40
- #!/bin/bash
41
- while true; do
42
- sleep 300
43
- echo "Backing up data to Hugging Face..."
44
- huggingface-cli upload $REPO_ID /home/user/storage . --repo-type=dataset --token=$HF_TOKEN
45
- done
46
- EOF
47
- chmod +x /home/user/auto_backup.sh
48
- ./auto_backup.sh &
49
-
50
- #
51
- cat <<EOF > /home/user/final_backup.sh
52
- #!/bin/bash
53
- #
54
-
55
- echo "Hugging Face is about to restart soon. Taking final backup..."
56
- huggingface-cli upload $REPO_ID /home/user/storage . --repo-type=dataset --token=$HF_TOKEN
57
- EOF
58
- chmod +x /home/user/final_backup.sh
59
- ./final_backup.sh &
60
-
61
- # เงช.
62
- echo "--- System is Ready. Access via Web Terminal ---"
63
- ttyd -p 7860 -W bash
 
14
  COPY --chown=user:user start.sh /home/user/start.sh
15
  RUN chmod +x /home/user/start.sh
16
 
17
+ ENTRYPOINT ["/home/user/start.sh"]