Spaces:
Running
Running
Commit
·
8230b79
1
Parent(s):
a044b62
fixed incorrect omnitool space url constant. Simplifying launch when git pull returned Already up to date.
Browse files- hf_server.js +2 -2
- omnitool_init.sh +17 -12
hf_server.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
-
const VERSION = '0.6.0.hf.012.
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
@@ -24,7 +24,7 @@ const FAVICON = 'https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-
|
|
24 |
|
25 |
//const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
26 |
//const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
27 |
-
const OMNITOOL_SPACE_URL = "
|
28 |
const HF_SPACE_URL = "https://huggingface.co/spaces/omnitool-ai/omnitool_on_hf";
|
29 |
const HF_SPACE_DUPLICATE_URL = "https://huggingface.co/spaces/omnitool-ai/omnitool_on_hf?duplicate=true";
|
30 |
|
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
+
const VERSION = '0.6.0.hf.012.b';
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
|
|
24 |
|
25 |
//const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
26 |
//const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
27 |
+
const OMNITOOL_SPACE_URL = "omnitool-ai-omnitool-on-hf.hf.space";
|
28 |
const HF_SPACE_URL = "https://huggingface.co/spaces/omnitool-ai/omnitool_on_hf";
|
29 |
const HF_SPACE_DUPLICATE_URL = "https://huggingface.co/spaces/omnitool-ai/omnitool_on_hf?duplicate=true";
|
30 |
|
omnitool_init.sh
CHANGED
@@ -3,9 +3,22 @@ echo "[->] START "
|
|
3 |
|
4 |
echo "[->] UPDATE OMNITOOL "
|
5 |
cd ./omnitool
|
6 |
-
git pull
|
7 |
-
cd ..
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
# echo "[->] CHECKING EXISTING /DATA "
|
10 |
# if [ -d "/data" ]; then
|
11 |
# echo "$(ls -l /data)"
|
@@ -36,16 +49,8 @@ cd ..
|
|
36 |
# else
|
37 |
# echo "[v] NO persistent /DATA DETECTED. You can add 20Gig of persistent storage as a paid option to Hugging Face"
|
38 |
# fi
|
39 |
-
|
40 |
-
|
41 |
-
cd omnitool
|
42 |
-
|
43 |
-
echo "[->] YARN INSTALL"
|
44 |
-
yarn
|
45 |
-
|
46 |
-
echo "[->] Updating permissions"
|
47 |
-
chmod -R 0777 .
|
48 |
-
chown -Rh node:node .
|
49 |
|
50 |
echo "[->] YARN START "
|
51 |
yarn start -u -rb -R blocks
|
|
|
3 |
|
4 |
echo "[->] UPDATE OMNITOOL "
|
5 |
cd ./omnitool
|
|
|
|
|
6 |
|
7 |
+
output=$(git pull)
|
8 |
+
|
9 |
+
if echo "$output" | grep -q "Already up to date."; then
|
10 |
+
echo "The repository is already up to date."
|
11 |
+
else
|
12 |
+
echo "New data was fetched."
|
13 |
+
echo "[->] YARN INSTALL"
|
14 |
+
yarn
|
15 |
+
|
16 |
+
echo "[->] Updating permissions"
|
17 |
+
chmod -R 0777 .
|
18 |
+
chown -Rh node:node .
|
19 |
+
fi
|
20 |
+
|
21 |
+
# cd ..
|
22 |
# echo "[->] CHECKING EXISTING /DATA "
|
23 |
# if [ -d "/data" ]; then
|
24 |
# echo "$(ls -l /data)"
|
|
|
49 |
# else
|
50 |
# echo "[v] NO persistent /DATA DETECTED. You can add 20Gig of persistent storage as a paid option to Hugging Face"
|
51 |
# fi
|
52 |
+
# echo "[->] CD OMNITOOL "
|
53 |
+
# cd omnitool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
echo "[->] YARN START "
|
56 |
yarn start -u -rb -R blocks
|