arnidan / nsfw-api Goto Github PK
View Code? Open in Web Editor NEWWrapper around NSFWJS to provide API.
Wrapper around NSFWJS to provide API.
$ docker run -p 3000:3000 ghcr.io/arnidan/nsfw-api:latest
yarn run v1.22.5
$ node build/index.js
Illegal instruction (core dumped)
error Command failed with exit code 132.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
docker pull ghcr.io/arnidan/nsfw-api:latest
docker run -p 3000:3000 ghcr.io/arnidan/nsfw-api:latest
yarn run v1.22.19
$ node build/index.js
Illegal instruction (core dumped)
error Command failed with exit code 132.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Docker version 23.0.3, build 3e7cbfd
Debian 11.6 x64
I have tried to build manually, but get the same error
Maybe add some optional light-weighted models to choose from? After all, Inception is a bit too heavy for small servers. Its memory consumption is too large.
Using the following curl command for debugging, the server did not return anything.
curl --request POST http://localhost:8080/classify \
--header 'Content-Type: multipart/form-data' \
--form 'image=@/www/wwwroot/0.jpg'
curl: (52) Empty reply from server
Before, my nsfw-api was working normally. Today, this issue appeared.
yarn run v1.22.5
$ node build/index.js
Illegal instruction (core dumped)
error Command failed with exit code 132.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[root@HKosrlmx0v nsfwapi]# cat docker-compose.yaml
version: "3.3"
services:
nsfw-api:
image: "ghcr.io/arnidan/nsfw-api:latest"
ports:
- "127.0.0.1:3333:3000"
restart: always
[root@HKosrlmx0v nsfwapi]# docker-compose ps
Name Command State Ports
------------------------------------------------------------------
nsfwapi_nsfw-api_1 yarn start Up 127.0.0.1:3333->3000/tcp
[root@HKosrlmx0v nsfwapi]# docker-compose logs
Attaching to nsfwapi_nsfw-api_1
nsfw-api_1 | yarn run v1.22.19
nsfw-api_1 | $ node build/index.js
nsfw-api_1 | 2023-01-29 03:19:20.278770: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 34515525 exceeds 10% of free system memory.
nsfw-api_1 | 2023-01-29 03:19:20.365811: W tensorflow/core/framework/cpu_allocator_impl.cc:82] Allocation of 138062100 exceeds 10% of free system memory.
nsfw-api_1 | Error: Path /model/model.json does not exist: loading failed
nsfw-api_1 | at /node_modules/@tensorflow/tfjs-node/dist/io/file_system.js:67:23
[root@HKosrlmx0v nsfwapi]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/arnidan/nsfw-api latest ca593acd673a 3 months ago 1.6GB
The correct docker-compose.yml should be the following:
version: "3.9"
services:
nsfw-api:
image: "ghcr.io/arnidan/nsfw-api:latest"
ports:
- "3000:3000"
restart: always
volumes:
- ./model:/model
Hello, friend:
After running, post requests prompts:
Error: Path /model/model.json does not exist: loading failed
at /node_modules/@tensorflow/tfjs-node/dist/io/file_system.js:67:23
docker-compose.yml Already added It's the same,Can you give me some guidance.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.