Spaces:
Running
Running
Commit
·
7d9c3d1
1
Parent(s):
f09f1f7
test version where we copy the content of /data into data.local... just to see...
Browse files- myNodeServer.js +4 -4
- omnitool_init.sh +8 -5
myNodeServer.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
-
const VERSION = '0.6.0.hf.
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
@@ -25,7 +25,7 @@ const FAVICON = 'https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-
|
|
25 |
const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
26 |
const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
27 |
const HF_SPACE_URL = `https://huggingface.co/spaces/${OMNITOOL_SPACE_OWNER}/${OMNITOOL_SPACE_NAME}`;
|
28 |
-
const HF_SPACE_DUPLICATE_URL = `https://huggingface.co/spaces/manu-sapiens/
|
29 |
|
30 |
const DELAY_OMNITOOL_SET_TO_RUNNING = 2000; // 2 seconds
|
31 |
const CHECK_OMNI_INTERVAL = 60000; // 1 minute
|
@@ -254,10 +254,10 @@ function getButtonsString(buttonsHTML)
|
|
254 |
let connectionStatusMessage;
|
255 |
if (global.CONNECTED_TO_MASTER)
|
256 |
{
|
257 |
-
connectionStatusMessage = '<div
|
258 |
} else
|
259 |
{
|
260 |
-
connectionStatusMessage = `<div style="color: green;">You are now connected to the space of ${global.SPACE_OWNER}
|
261 |
}
|
262 |
|
263 |
return `
|
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
+
const VERSION = '0.6.0.hf.010e';
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
|
|
25 |
const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
26 |
const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
27 |
const HF_SPACE_URL = `https://huggingface.co/spaces/${OMNITOOL_SPACE_OWNER}/${OMNITOOL_SPACE_NAME}`;
|
28 |
+
const HF_SPACE_DUPLICATE_URL = `https://huggingface.co/spaces/manu-sapiens/omnitool_test_3?duplicate=true`;
|
29 |
|
30 |
const DELAY_OMNITOOL_SET_TO_RUNNING = 2000; // 2 seconds
|
31 |
const CHECK_OMNI_INTERVAL = 60000; // 1 minute
|
|
|
254 |
let connectionStatusMessage;
|
255 |
if (global.CONNECTED_TO_MASTER)
|
256 |
{
|
257 |
+
connectionStatusMessage = '<div>You are now connected DIRECTLY to the REFERENCE Omnitool Space on Huggingface.</div><div style="color: red;">It is HIGHLY recommended that you duplicate this space and make it private to secure your keys, recipes and outputs.</div>';
|
258 |
} else
|
259 |
{
|
260 |
+
connectionStatusMessage = `<div style="color: green;">You are now connected to the space of ${global.SPACE_OWNER}.</div><div>If this is NOT you, it is HIGHLY recommended that you duplicate this space and make it private to secure your keys, recipes and outputs.</div><div>In addition, consider subscribing to the 20GB local storage option from Huggingface to preserve your keys and work between reboot of this server.</div>`;
|
261 |
}
|
262 |
|
263 |
return `
|
omnitool_init.sh
CHANGED
@@ -9,7 +9,7 @@ chmod 0777 ./omnitool
|
|
9 |
chown -R node ./omnitool
|
10 |
|
11 |
mkdir -p ./omnitool/node_modules
|
12 |
-
chmod
|
13 |
chown node ./omnitool/node_modules
|
14 |
|
15 |
echo "--- CHECKING EXISTING /DATA ---"
|
@@ -23,13 +23,16 @@ if [ -d "/data" ]; then
|
|
23 |
fi
|
24 |
|
25 |
mkdir ./omnitool/packages/omni-server/data.local
|
26 |
-
chmod
|
27 |
chown node ./omnitool/packages/omni-server/data.local
|
28 |
|
29 |
# Create the symlink
|
30 |
-
echo "--- Create the symlink ---"
|
31 |
-
ln -s /data ./omnitool/packages/omni-server/data.local
|
32 |
-
chown node ./omnitool/packages/omni-server/data.local
|
|
|
|
|
|
|
33 |
else
|
34 |
echo "--- NO persistent /DATA DETECTED. You can add 20Gig of persistent storage as a paid option to Hugging Face"
|
35 |
fi
|
|
|
9 |
chown -R node ./omnitool
|
10 |
|
11 |
mkdir -p ./omnitool/node_modules
|
12 |
+
chmod 0777 ./omnitool/node_modules
|
13 |
chown node ./omnitool/node_modules
|
14 |
|
15 |
echo "--- CHECKING EXISTING /DATA ---"
|
|
|
23 |
fi
|
24 |
|
25 |
mkdir ./omnitool/packages/omni-server/data.local
|
26 |
+
chmod 0777 ./omnitool/packages/omni-server/data.local
|
27 |
chown node ./omnitool/packages/omni-server/data.local
|
28 |
|
29 |
# Create the symlink
|
30 |
+
#echo "--- Create the symlink ---"
|
31 |
+
#ln -s /data ./omnitool/packages/omni-server/data.local
|
32 |
+
#chown node ./omnitool/packages/omni-server/data.local
|
33 |
+
cp -r /data ./omnitool/packages/omni-server/data.local
|
34 |
+
chown -R node ./omnitool/packages/omni-server/data.local
|
35 |
+
|
36 |
else
|
37 |
echo "--- NO persistent /DATA DETECTED. You can add 20Gig of persistent storage as a paid option to Hugging Face"
|
38 |
fi
|