Comments (13)
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.
@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.
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.
@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.
@cyrildiagne Thanks for the quick response. Yes it does solved the issue. But however, it is still returning empty response.
Where should i move the resnet34-333f7ec4.pth
file?
Thanks!
from basnet-http.
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.
@MatiasConTilde Still it's sending an empty response. Is it working for you using Docker?
from basnet-http.
thx @viktorlorentz increase the memory solved the problem
@cyrildiagne thank you for the code !
from basnet-http.
I increased the allocated memory in docker desktop preferences but still getting this error
curl: (52) Empty reply from server
from basnet-http.
Yes this fixed it for me too - thanks - 6Mb worked for me
from basnet-http.
~~ I followed @ivoneijr suggestions but I keep getting (52) Empty reply from server
. ~~
EDIT: This settings work great:
from basnet-http.
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.
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)
- Error main.py HOT 3
- Image Permission Denied HOT 3
- RuntimeError: CUDA error: out of memory HOT 2
- Get black-white image HOT 1
- Unable to complete Test HOT 12
- Error Response HOT 1
- Empty response to test curl HOT 10
- Curl Return error
- Do you need reference to Resnet? HOT 2
- Return image on 256 x 256 HOT 3
- result.png is broken HOT 2
- Images are 265x265px HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from basnet-http.