Code Monkey home page Code Monkey logo

Comments (13)

bheather avatar bheather commented on April 28, 2024 3

Hi This looks really interesting but I also get the empty reply. I've tried your prebuilt image and built my own with the same result.

If I browse to the http://localhost:8080 I get the "Hello BASNet!" response. I am using one of the existing test images from BASNet. My resnet34-333f7ec4.pth is alongside my dockerfile. My basnet.pth is in the BASNet\saved_models\basnet_bsi folder.

docker run --rm -p 8080:80 gcr.io/cyrildiagne-ml/basnet-http [2020-05-05 01:54:37 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2020-05-05 01:54:37 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2020-05-05 01:54:37 +0000] [1] [INFO] Using worker: sync
[2020-05-05 01:54:37 +0000] [8] [INFO] Booting worker with pid: 8
[2020-05-05 01:56:08 +0000] [16] [INFO] Booting worker with pid: 16
[2020-05-05 01:56:20 +0000] [1] [INFO] Handling signal: term
[2020-05-05 01:56:20 +0000] [16] [INFO] Worker exiting (pid: 16)
Loading BASNet...
[2020-05-05 01:56:20 +0000] [1] [INFO] Shutting down: Master

:/mnt/f/dev/OpenSrc/.XR/ARCutPaste/BASNet-http$ curl -F "[email protected]" http://localhost:8080 -o result.png
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 365k 0 0 100 365k 0 41536 0:00:09 0:00:09 --:--:-- 0
curl: (52) Empty reply from server

from basnet-http.

viktorlorentz avatar viktorlorentz commented on April 28, 2024 2

@rakibtg For me it worked with the prebuilt image after increasing the allocated memory in the docker desktop preferences under resources.

@cyrildiagne Nice work!

from basnet-http.

cyrildiagne avatar cyrildiagne commented on April 28, 2024 1

Hi,

Looks like the instruction in my README is wrong. The server is listening on port 80 (as defined in the docker file) so could you try mounting port 80 instead of 8080? 8020:80

If that works, I'll fix the README.

from basnet-http.

ivoneijr avatar ivoneijr commented on April 28, 2024 1

@amardeepsingh20 did you increase only on docker desktop settings ?
Don't forget, if you increase on docker desktop settings, don't use -m option on docker run command.

I got the same problems than you, here is what i did:

  • increase allocation memory to 2gb on docker desktop settings (it's to much, I know, but it's just to have sure that memory is not a problem at this point)
  • change default port on dockerfile ENV PORT 3000
  • run docker run --rm -p 3000:3000 basnet

Working very well.

from basnet-http.

rakibtg avatar rakibtg commented on April 28, 2024

@cyrildiagne Thanks for the quick response. Yes it does solved the issue. But however, it is still returning empty response.
image

Where should i move the resnet34-333f7ec4.pth file?
Thanks!

from basnet-http.

MatiasConTilde avatar MatiasConTilde commented on April 28, 2024

Hi,

Looks like the instruction in my README is wrong. The server is listening on port 80 (as defined in the docker file) so could you try mounting port 80 instead of 8080? 8080:80

If that works, I'll fix the README.

It also worked for me

Where should i move the resnet34-333f7ec4.pth file?

In the root of this project, the same directory where the Dockerfile is. This could also be made more clear in the README

from basnet-http.

rakibtg avatar rakibtg commented on April 28, 2024

@MatiasConTilde Still it's sending an empty response. Is it working for you using Docker?

from basnet-http.

yeahlo avatar yeahlo commented on April 28, 2024

thx @viktorlorentz increase the memory solved the problem

@cyrildiagne thank you for the code !

from basnet-http.

amardeepsingh20 avatar amardeepsingh20 commented on April 28, 2024

I increased the allocated memory in docker desktop preferences but still getting this error

curl: (52) Empty reply from server

from basnet-http.

bheather avatar bheather commented on April 28, 2024

Yes this fixed it for me too - thanks - 6Mb worked for me

from basnet-http.

buskerone avatar buskerone commented on April 28, 2024

~~ I followed @ivoneijr suggestions but I keep getting (52) Empty reply from server. ~~

EDIT: This settings work great:

settings

Result:
terminal

1CC28EB8-EFC6-4195-AD84-24315DBAB9E3

from basnet-http.

amardeepsingh20 avatar amardeepsingh20 commented on April 28, 2024

I was able to get it working on my Macbook Air after increasing the worker timeout setting of gunicorn to 300 .. seems like the GPU is not getting used and it is taking upwards of 200 seconds to process one image of 800x800 pixels. :(

from basnet-http.

cyrildiagne avatar cyrildiagne commented on April 28, 2024

Thanks everyone for the feedback. I've fixed the 8080:80 port and added RAM requirements in the README.

@amardeepsingh20 Strange, on my macbookpro 2.8Ghz / 16 Gb of RAM I'm not getting this kind of latency. But yes, it runs a LOT faster with CUDA support. Nothing I can do here as it's the model's requirements.

There are many different issues in this thread now making it hard to track. I'm closing, but feel free to reopen if something's left out.

Cheers,

from basnet-http.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.