Spaces:
Running
Running
Commit
·
70e0ab0
1
Parent(s):
c9dd412
re-adding omnitool cloned directory to avoid ownership issues
Browse files- Dockerfile +6 -6
- myNodeServer.js +1 -3
- omnitool +1 -0
- omnitool_start.sh +3 -10
- prepare.sh +6 -0
Dockerfile
CHANGED
@@ -5,12 +5,12 @@ WORKDIR /app
|
|
5 |
|
6 |
RUN chmod 777 /app
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
|
15 |
RUN chown -Rh $user:$user /app
|
16 |
|
|
|
5 |
|
6 |
RUN chmod 777 /app
|
7 |
|
8 |
+
RUN mkdir -p /app/omnitool/node_modules
|
9 |
+
RUN chmod 777 /app/omnitool/node_modules
|
10 |
+
RUN mkdir -p /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
|
11 |
+
RUN chmod 777 /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/
|
12 |
+
RUN 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
|
13 |
+
RUN chmod 777 /app/omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
|
14 |
|
15 |
RUN chown -Rh $user:$user /app
|
16 |
|
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');
|
@@ -21,8 +21,6 @@ const CONTAINER_PORT_OMNITOOL = 1688;
|
|
21 |
const OMNITOOL_HEALTH_PING = '/api/v1/mercenaries/ping';
|
22 |
const FAVICON = 'https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-ui/omni-web/public/favicon.jpg'
|
23 |
|
24 |
-
|
25 |
-
|
26 |
const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
27 |
const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
28 |
const HF_SPACE_URL = `https://huggingface.co/spaces/${OMNITOOL_SPACE_OWNER}/${OMNITOOL_SPACE_NAME}`;
|
|
|
3 |
* All rights reserved.
|
4 |
*/
|
5 |
//@ts-check
|
6 |
+
const VERSION = '0.6.0.hf.003';
|
7 |
|
8 |
const express = require('express');
|
9 |
const http = require('http');
|
|
|
21 |
const OMNITOOL_HEALTH_PING = '/api/v1/mercenaries/ping';
|
22 |
const FAVICON = 'https://github.com/omnitool-ai/omnitool/raw/main/packages/omni-ui/omni-web/public/favicon.jpg'
|
23 |
|
|
|
|
|
24 |
const OMNITOOL_SPACE_NAME = 'omnitool-test-3';
|
25 |
const OMNITOOL_SPACE_OWNER = 'manu-sapiens';
|
26 |
const HF_SPACE_URL = `https://huggingface.co/spaces/${OMNITOOL_SPACE_OWNER}/${OMNITOOL_SPACE_NAME}`;
|
omnitool
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 8cc31bba952351a937b58b010635022f01ccff06
|
omnitool_start.sh
CHANGED
@@ -1,16 +1,6 @@
|
|
1 |
#!/bin/bash
|
2 |
echo "--- START ---"
|
3 |
|
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 ---"
|
@@ -41,6 +31,9 @@ fi
|
|
41 |
echo "--- CD OMNITOOL ---"
|
42 |
cd omnitool
|
43 |
|
|
|
|
|
|
|
44 |
echo "--- YARN INSTALL ---"
|
45 |
yarn
|
46 |
|
|
|
1 |
#!/bin/bash
|
2 |
echo "--- START ---"
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
if [ -d "/data" ] && [ ! -L "/app/omnitool/packages/omni-server/data.local" ]; then
|
5 |
# Backup the existing data.local directory
|
6 |
echo "--- Backup the existing data.local directory ---"
|
|
|
31 |
echo "--- CD OMNITOOL ---"
|
32 |
cd omnitool
|
33 |
|
34 |
+
echo "--- GIT PULL ---"
|
35 |
+
git pull
|
36 |
+
|
37 |
echo "--- YARN INSTALL ---"
|
38 |
yarn
|
39 |
|
prepare.sh
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
echo "--- GIT OMNITOOL ---"
|
2 |
+
git clone https://github.com/omnitool-ai/omnitool
|
3 |
+
echo "--- REMOVING latge file from OMNITOOL distribution ---"
|
4 |
+
rm ./omnitool/packages/omni-server/data.local
|
5 |
+
rm ./omnitool/assets/*
|
6 |
+
rm ./omnitool/packages/omni-server/config.default/models/nsfwjs/mobilenet-v2-quant/group1-shard1of1
|