Spaces:
Running
Running
Commit
·
c9dd412
1
Parent(s):
57156b3
fixing permission issue on omnitool/node_modules
Browse files- myNodeServer.js +2 -2
- omnitool_start.sh +7 -0
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');
|
@@ -355,7 +355,7 @@ async function handleGetRoot(req, res)
|
|
355 |
let buttonsHTML = `
|
356 |
<button id="startServerButton" class="${startButtonClass}" onclick="startServer()">Start Omnitool Server</button>
|
357 |
<button id="exitIframeButton" class="${gotoButtonClass}" onclick="exitIframe()">GOTO OMNITOOL</button>
|
358 |
-
<a href="${HF_SPACE_DUPLICATE_URL}" target="_blank" class="button-like-link" id="duplicateRepoButton">DUPLICATE
|
359 |
|
360 |
const html = getButtonsString(buttonsHTML);
|
361 |
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
+
const VERSION = '0.6.0.hf.002';
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
|
|
355 |
let buttonsHTML = `
|
356 |
<button id="startServerButton" class="${startButtonClass}" onclick="startServer()">Start Omnitool Server</button>
|
357 |
<button id="exitIframeButton" class="${gotoButtonClass}" onclick="exitIframe()">GOTO OMNITOOL</button>
|
358 |
+
<a href="${HF_SPACE_DUPLICATE_URL}" target="_blank" class="button-like-link" id="duplicateRepoButton">DUPLICATE SPACE</a>`;
|
359 |
|
360 |
const html = getButtonsString(buttonsHTML);
|
361 |
res.writeHead(200, { 'Content-Type': 'text/html' });
|
omnitool_start.sh
CHANGED
@@ -4,6 +4,13 @@ echo "--- START ---"
|
|
4 |
echo "--- GIT OMNITOOL ---"
|
5 |
git clone https://github.com/omnitool-ai/omnitool.git
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
if [ -d "/data" ] && [ ! -L "/app/omnitool/packages/omni-server/data.local" ]; then
|
8 |
# Backup the existing data.local directory
|
9 |
echo "--- Backup the existing data.local directory ---"
|
|
|
4 |
echo "--- GIT OMNITOOL ---"
|
5 |
git clone https://github.com/omnitool-ai/omnitool.git
|
6 |
|
7 |
+
mkdir -p /app/omnitool/node_modules
|
8 |
+
chmod 777 /app/omnitool/node_modules
|
9 |
+
#mkdir -p /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
|
10 |
+
#chmod 777 /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
|
11 |
+
#curl -L https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1 -o /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
|
12 |
+
#chmod 777 /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
|
13 |
+
|
14 |
if [ -d "/data" ] && [ ! -L "/app/omnitool/packages/omni-server/data.local" ]; then
|
15 |
# Backup the existing data.local directory
|
16 |
echo "--- Backup the existing data.local directory ---"
|