deepdetect
deepdetect copied to clipboard
Question about hosting the docker image
(A Markdown syntax reminder is available here: https://guides.github.com/features/mastering-markdown/)
Before creating a new issue, please make sure that:
- [x] the problem isn't already identified in the in the FAQ page,
- [x] your problem isn't listed in an existing issue (open or closed one),
- [x] all prerequisite tools and dependencies are installed.
If Ok, please give as many details as possible to help us solve the problem more efficiently.
Configuration
- Version of DeepDetect:
- [ ] Locally compiled on:
- [ ] Ubuntu 18.04 LTS
- [ ] Other:
- [x] Docker CPU
- [ ] Docker GPU
- [ ] Amazon AMI
- [ ] Locally compiled on:
- Commit (shown by the server when starting):
Your question / the problem you're facing:
Hi,
I have 2 questions. I hope it is okay, when I bundle them here:
-
I am calling the server from a local service, that uses a self signed https certificate. Is it possible to turn off https validation to download the image from this service?
-
I am trying to figure out how to host this. My problem is that I would like to use it in a setup with multiple hosting options. My own kubernetes setup, but also cloud and so on. If I understand it properly the services are not persisted, right? They only exist in memory and are just a mapping to a model. So my only option would be to have a sidecar in kubernetes or find a solution how to make a network call in the container itself after service is already started? Calling the container from the outside does not seem to work, when you have multiple instances with unknown hostnames. Is there a good solution for that to setup a container?
Error message (if any) / steps to reproduce the problem:
-
[ ] list of API calls:
-
[ ] Server log output:
Hi @SebastianStehle some answers below:
1. I am calling the server from a local service, that uses a self signed https certificate. Is it possible to turn off https validation to download the image from this service?
Rephrasing to make sure I understand correctly: fetching (png,jpg,...) images from self-signed certificate yields an error.
Two ways of fixing this I see:
- https://www.mail-archive.com/[email protected]/msg00227.html shows how to optionally tell libcurlpp not to check on the SSL certificate. This would require adding the option to https://github.com/jolibrain/deepdetect/blob/master/src/utils/httpclient.hpp#L39. Let us know whether you need this, could be added, though we never faced the need until now.
- Use let's encrypt to sign your certificate, if this is applicable
2. I am trying to figure out how to host this. My problem is that I would like to use it in a setup with multiple hosting options. My own kubernetes setup, but also cloud and so on. If I understand it properly the services are not persisted, right? They only exist in memory and are just a mapping to a model. So my only option would be to have a sidecar in kubernetes or find a solution how to make a network call in the container itself after service is already started? Calling the container from the outside does not seem to work, when you have multiple instances with unknown hostnames. Is there a good solution for that to setup a container?
You are correct the services are not persisted. However, the dede exe has a --service_start_list option that takes a file with the list of service creation JSON calls to execute upon startup.
Now, this may not be exactly straightforward to use with our provided Docker images since they do start the server without a service start file here: https://github.com/jolibrain/deepdetect/blob/master/docker/cpu.Dockerfile#L188
A solution here would be to build your own docker images, another would be to find a way to override the call upon startup, my personal knowledge of Docker does not extend far enough to tell you with certainty whether and how this is possible.
Don't hesitate if this does not fully answer your difficulties.
Thanks a lot for the fast answer.
-
Such an option (e.g. as environment variable) would be awesome. My users make a lot of weird things, so it is not only about local development.
-
I figured this out myself: I have just created a script that I run in the background: https://github.com/Squidex/squidex-hosting/tree/master/development/deepdetect. This script then waits for the server and creates the service: https://github.com/Squidex/squidex-hosting/blob/master/development/deepdetect/setup.sh
- Such an option (e.g. as environment variable) would be awesome. My users make a lot of weird things, so it is not only about local development.
In our way of structuring options, it might be an API parameter instead.
Fine for me as well...